Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from pdm to uv #219

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Switch from pdm to uv #219

wants to merge 5 commits into from

Conversation

auscompgeek
Copy link
Member

@auscompgeek auscompgeek commented Oct 21, 2024

I've been pondering for a couple of weeks whether switching to uv as our package manager would be worthwhile. I've come to the conclusion it probably is.

The biggest benefit to using uv is that it's also able to download and manage Python versions. The fact that we've been trying to ensure our robot code runs on earlier Python versions, mainly for the benefit of Linux users, has been holding us back from adopting new Python syntax.

Starting next year, we could adopt uv and just assume everyone runs the same major version of Python that will be running on the robot, because we will be since we'll all be using uv.

The only major drawback seems to be that we'll lose the little package scripts that we've defined:

[tool.pdm.scripts]
deploy = "robotpy deploy"
download = "robotpy sync --no-install"
sim = "robotpy sim"
test = "robotpy test --"

However, I think most of the team references the readme most of the time anyway, so it's probably not a major loss.


A small note: the uv lockfile I'm checking in has newer versions of some of our transitive dependencies. Most of these differing dependencies are for development or testing only anyway.

Package diff
$ uv sync
Resolved 47 packages in 2ms
Prepared 15 packages in 19.20s
Uninstalled 15 packages in 242ms
Installed 15 packages in 124ms
 - attrs==23.2.0
 + attrs==24.2.0
 - bcrypt==4.1.2
 + bcrypt==4.2.0
 - cffi==1.16.0
 + cffi==1.17.1
 - cryptography==41.0.7
 + cryptography==43.0.1
 - hypothesis==6.97.4
 + hypothesis==6.112.1
 - mypy==1.8.0
 + mypy==1.11.2
 - numpy==1.26.3
 + numpy==1.26.4
 - paramiko==3.4.0
 + paramiko==3.5.0
 - pint==0.23
 + pint==0.24.3
 - pluggy==1.3.0
 + pluggy==1.5.0
 - pycparser==2.21
 + pycparser==2.22
 - pytest==8.0.0
 + pytest==8.3.3
 - setuptools==69.0.3
 + setuptools==75.1.0
 - tomlkit==0.12.3
 + tomlkit==0.13.2
 - typing-extensions==4.9.0
 + typing-extensions==4.12.2

@auscompgeek auscompgeek marked this pull request as ready for review October 21, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant