Repository navigation
Build: migrate to uv - #276
elliot-100 wants to merge 2 commits into
Conversation
d5a243a to
3b0ef90
Compare
3b0ef90 to
636fcca
Compare
|
[RESOLVED] @Olen I forgot in |
|
[RESOLVED] Also, |
d2fa77e to
4f8e678
Compare
|
OK, I think this is ready for initial review @Olen. There is one outstanding migration issue I haven't resolved yet: in Looks like it needs a bit of code to get it from Alternatively, to get it from |
4f8e678 to
b128293
Compare
This PR:
Migrates from
poetrytouvfor package management - and along with that, to a standard 'PEP621'pyproject.toml. Amends 3 of the 4 CI workflows, and DependabotCommits the
uv.locklockfile to the repo for reproducible dev/CI builds (NB this has no effect on package locking for consumers)Moves
/spondto/src/spondwhich is the preferred file layout foruvand makes it more difficult to e.g. run tests on stale codeuvwithout doing this, it would require additional build configuration@Olen please can you review and let me know if I've missed anything
Detail
Dependency versions
Uses the
lowest-directdependency resolution strategy for the lockfile. i.e. the lowest compatible versions foraiohttp, while using the latest compatible versions for all other dependencies. This avoids the chore of updating indirect deps.Pins all dev/CI dependencies to exact versions for reproducibility (was just
ruffpreviously) - while withlowest-directthis isn't strictly necessary, I think it makes intent clearerWe don't need the
python = "<4"constraint forpdocwith uvCI
uv(latest, 13.0) is installed using a specific commit ofastral-sh/setup-uv, as peruvdocs recommendationactions/setup-python. While it's possible to do this withuv, it's not a great fit for CI - slower and blocks GitHub caching (but we're not using that yet)python-package.ymladds an extra check asserting that the lockfile is currentpublish-docs.ymlnow uses the installed version of the package, as tests do. While they should be the same in a CI run, this helps expose build misconfiguration issuesVersion pinning during development
.python-versionfile to ensureuvuses a specific version of Python for their environment, e.g. if fixing an issue on an old version. This PR adds that file to.gitignoreto prevent it being committed - it's not relevant to the library itself