Python(chore): add uv for dev#581
Open
alexluck-sift wants to merge 5 commits into
Open
Conversation
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-581/ Deployed from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Migrate the Python dev workflow and CI from
pip install+venv/to uv:python/scripts/devbootstraps viauv sync --extra dev-all, every subcommand runs throughuv run, and pre-push hooks (extras.sh,fmt-lint.sh,stubs.sh,lock.sh) follow suit.Commit
uv.lockso dev and CI share a single resolved dependency set. Fork resolution acrosspython_version < '3.9',== '3.9.*', and>= '3.10'([tool.uv].environments) lets each minor pick its own valid solution — 3.8 lands on numpy 1.24 + rosbags 0.9.23, 3.10+ on numpy 2.x + rosbags 0.11.2 — without the lockfile having to find a single set that fits the whole range.python_ci.yaml: astatic-checksjob (lint/format/mypy/pyright/stubs/extras/stubtest +uv lock --check) plus a matrixtest-pythonjob that syncs from the lockfile and runs pytest under the 3.8 floor interpreter. Adds amypy --platform=win32pass to catch Windows-only stub breakage (e.g.fcntl).Add
test-floor(3.8) andtest-ceiling(3.14) dev subcommands for local floor/ceiling exercises.Mark optional extras with their real version floors:
rosbags ; python_full_version >= '3.8.2'(rosbags 0.9.23's lower bound), and docs entries withpython_version >= '3.10'so the <3.10 forks resolve without docs tooling. Baserequires-pythonstays at>=3.8.Tighten
rapidyaml~=0.11torapidyaml>=0.11,<0.13— 0.13.0 ships sdist-only with no wheels, so a re-resolve would break installs for users without a C++ toolchain.Add a mypy override for
alive_progressto neutralize its overly tightalive_itstubs.