Skip to content

Python(chore): add uv for dev#581

Open
alexluck-sift wants to merge 5 commits into
mainfrom
al/python/chore/uv-for-legacy-version-support
Open

Python(chore): add uv for dev#581
alexluck-sift wants to merge 5 commits into
mainfrom
al/python/chore/uv-for-legacy-version-support

Conversation

@alexluck-sift
Copy link
Copy Markdown
Collaborator

@alexluck-sift alexluck-sift commented May 21, 2026

Summary

  • Migrate the Python dev workflow and CI from pip install + venv/ to uv: python/scripts/dev bootstraps via uv sync --extra dev-all, every subcommand runs through uv run, and pre-push hooks (extras.sh, fmt-lint.sh, stubs.sh, lock.sh) follow suit.

  • Commit uv.lock so dev and CI share a single resolved dependency set. Fork resolution across python_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: a static-checks job (lint/format/mypy/pyright/stubs/extras/stubtest + uv lock --check) plus a matrix test-python job that syncs from the lockfile and runs pytest under the 3.8 floor interpreter. Adds a mypy --platform=win32 pass to catch Windows-only stub breakage (e.g. fcntl).

  • Add test-floor (3.8) and test-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 with python_version >= '3.10' so the <3.10 forks resolve without docs tooling. Base requires-python stays at >=3.8.

  • Tighten rapidyaml~=0.11 to rapidyaml>=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_progress to neutralize its overly tight alive_it stubs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Python docs preview: https://sift-stack.github.io/sift/python/pr-581/

Deployed from e286c37. The link may take up to a minute to become live as GitHub Pages propagates.

@alexluck-sift alexluck-sift marked this pull request as ready for review May 22, 2026 21:06
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