-
Notifications
You must be signed in to change notification settings - Fork 0
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
build: Use uv over Poetry #60
Conversation
95e0b44
to
9af186a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explanation: Once less place to maintain the version, as setup-python supports pyproject.yaml
.
are these changes to the pyproject.toml still compatible with poetry? |
@kdutia: They are not! |
@jesse-c so then to add to cons - everyone working with this repo needs to install happy to follow platform team consensus on this but the cost/benefit doesn't seem clear to me! |
@kdutia: Good point! I've added that to the list. It uses existing Python installations, though it can also manages its own, if desired. |
Similar to this con, having inconsistency across repos adds to cognitive load over time. So I don't think we really would want to add it to one place unless we where treating it as a trial before rolling it out more widely (And I don't think we should do that without dependabot support and without checking for wider buy-in more explicitly) |
I do really like the simplicity and speed increases though! Perhaps we can revisit after dependabot support is in? |
That's very reasonable! 🙇🏻 |
why:
Honestly, it's mostly for speed, and newness. We're relatively simple users of Python project/package tooling.
pros:
Dependencies installation is 150% faster (from 1.5mins → ~30secs), overall CI time is 100% faster (from ~3mins20secs [6] → ~1.5mins [7][8]) the
pyproject.toml
is slightly more adhering to the PEP standard, can consolidate tools like pipx, and can install Python versions/environments.cons:
Dependabot support is coming [1][2][3]. People are less familiar with uv. Requires installing uv.
testing:
I've tested it on a side-project for building and running a Docker image in Railway [4].
how:
This follows official recommendations [5] for CI/CD setup.
appendix:
[1] dependabot/dependabot-core#10040
[2] dependabot/dependabot-core#10039
[3] astral-sh/uv#2512
[4] https://github.com/jesse-c/instagram-image-already-posted-check/blob/87f4027f4262580fb327a685a34ddfcbab005a90/service/Dockerfile
[5] https://docs.astral.sh/uv/guides/integration/github/
[6] https://github.com/climatepolicyradar/knowledge-graph/actions/runs/11386004236/job/31677168819
[7] https://github.com/climatepolicyradar/knowledge-graph/actions/runs/11394946487/job/31706241571?pr=60
[8] https://github.com/climatepolicyradar/knowledge-graph/actions/runs/11394946487/job/31706241398?pr=60