Replace pdm
dependency solver with uv
#1891
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Describe this PR
uv:
uv
was released not too long ago and has since almost gained feature parity with other tools likepdm
.rust
and is orders of magnitude faster at locking dependencies: a minor win, but a nice one nonetheless.What I did:
pdm
withuv
.uv
and be a bit cleaner.pdm
.Minor caveats:
dynamic
field inpyproject.toml
:dynamic=["version"]
.commitizen
anyway, so nothing lost.Bonus:
uv
, allowing us to re-lock automatically if someone updates the a backend dependency and forgets to lock π (which would break the docker build otherwise).Key things of note:
uv lock
re-locks dependencies, including all optional groups.uv sync
installs dependencies locally.uv run ...
runs a command using installed dependencies venv.uv python list
anduv python install
.pdm publish
-->uv publish
for publishing to pypi.Note: I plan to talk about using this tool with the dev teams when I visit NAXA π
Screenshots
A fresh lock takes 1 second:
Checklist before requesting a review
[optional] What gif best describes this PR or how it makes you feel?