Skip to content

Commit

Permalink
switch back to uv pip install (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuadavidthomas authored Aug 5, 2024
1 parent 53a959a commit df01103
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed

- Add `--constraint requirements.txt` to the compiling of the two extra requirements files, to constrain the dependencies to the versions specified in the primary requirements file.
- Switch back from `uv pip sync` to `uv pip install` for dependency installation. `uv pip sync` itself is quite strict, only installing exactly what's specified in a given requirements file. This is fine, except if something like `pip` is installed in the virtual environment but not listed as a dependency, it will gladly uninstall it from the venv. I get why they do this, but it makes no sense for local installations to clobber any packages that may already be installed in the venv. In the future, we may consider using `uv pip sync` in environments where it makes sense to allow this behavior, e.g. in the `Dockerfile` or CI.

## [2024.43]

Expand Down
2 changes: 1 addition & 1 deletion src/django_twc_project/.just/documentation.just
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build LOCATION="docs/_build/html": cog
# Install documentation dependencies
[no-cd]
install *ARGS:
$python -m uv pip sync {{ ARGS }} docs/requirements.txt
$python -m uv pip install {{ ARGS }} docs/requirements.txt

# Generate documentation requirements
[no-cd]
Expand Down
2 changes: 1 addition & 1 deletion src/django_twc_project/.just/python.just.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ coverage-report: test
# Install dependencies
[no-cd]
install *ARGS:
$python -m uv pip sync {% raw %}{{ ARGS }}{% endraw %} requirements.txt requirements.dev.txt
$python -m uv pip install {% raw %}{{ ARGS }}{% endraw %} requirements.txt requirements.dev.txt

# Generate requirements.txt file
[no-cd]
Expand Down
1 change: 0 additions & 1 deletion src/django_twc_project/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ dev = [
"ipython",
"model_bakery",
"mypy",
"pip",
"playwright=={{ playwright_version }}",
"pre-commit",
"pytest",
Expand Down

0 comments on commit df01103

Please sign in to comment.