-
Notifications
You must be signed in to change notification settings - Fork 20
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
and ruff
#160
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #160 +/- ##
=======================================
Coverage ? 25.60%
=======================================
Files ? 41
Lines ? 3007
Branches ? 0
=======================================
Hits ? 770
Misses ? 2237
Partials ? 0 ☔ View full report in Codecov by Sentry. |
Hey @slevang that's awesome ! I heard about these things recently coming out from Astral and would love to give it a try and see how they work. Expecting my first child literally today :) - so I won't have time to review anytime soon. I'm OK giving it a try 👍 |
Amazing, congrats! Hope all goes smoothly, and enjoy those early days 🥰 |
- pip: | ||
- xeofs | ||
- -e ../.[docs] |
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.
Nice! This is so much cleaner!
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.
That's great - looking forward to see it in action! Thank you @slevang !
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.
One additional thought: we probably want to update the contributing guide, specifically the section about how to create a local env. Instead of poetry, would you prefer pip install -e .
and pip install -e .[docs]
or rather uv
?
Good point. I went with basic |
So this would be replacing
poetry
with yet another new shiny tool, but I would argue the benefits are worth it.uv
is a drop-in replacement forpip
, andruff
is their linter/formatter tool. Both are incredibly fast (written in rust), have a lot of convenient options, and are seeing rapid adoption across the python ecosystem.One really nice feature of
uv
is the--resolution
arg which I've used here to run tests on a "minimal" version, using lowest supported python version of 3.10 and lowest specified versions of all our primary dependencies. Then the 3.11 and 3.12 jobs run with--resolution=highest
which will always have us testing against new versions.The substantive changes of this PR are the
pyproject.toml
and the GH Actions. Everything else is only the result of running ruff's linter (almost all of them auto-fixed). Mostly unused imports, trimming whitespace, and a few other random things like truthy/falsy checks and unused f-strings.I did mess with the docs a little to get that running, and rebuilt all the sphinx. Hopefully didn't screw anything up there.
Only thing I haven't tested is the
build_command
and uploading of wheels to pypi, but it should work fine.