Migrate dev tooling from pip-tools/tox to uv#257
Open
hf-krechan wants to merge 1 commit into
Open
Conversation
Move dev-tool extras to PEP 735 dependency-groups, replace tox.ini and requirements.txt/.in with uv.lock, drop build/twine in favor of native uv build/uv publish, and rewrite GitHub Actions workflows and Dependabot config to use astral-sh/setup-uv + uv sync/run. Bump stale black, isort, and pre-commit-hooks pre-commit pins to match the versions now declared in pyproject.toml, and add the uv-lock pre-commit hook to keep the lockfile current automatically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
6 tasks
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
tests,coverage,linting,type_check,spellcheck,formatting) from[project.optional-dependencies]to PEP 735[dependency-groups]inpyproject.toml, plus adevgroup bundling them for local setup (mirroring the old toxdevenv, minus packaging tooling).test_packaginggroup (build/twine) entirely —uv buildanduv publish --dry-runreplace them natively with no dependency group needed.tox.ini,requirements.txt,requirements.in; adduv.lock(generated viauv lock).[tool.uv] default-groups = []so a bareuv sync/uv rundoesn't silently pull in thedevgroup..github/workflows/*.ymlto useastral-sh/setup-uv@v9.0.0+uv sync --group <x>+uv run --group <x> <tool>instead ofpip install tox+tox -e <x>;packaging_test.ymland the publish job now calluv build/uv publish --dry-rundirectly..github/dependabot.ymlecosystem frompiptouv.black(22.10.0 → 26.5.1),isort(5.10.1 → 8.0.1), andpre-commit-hooks(v4.3.0 → v6.0.0) pins in.pre-commit-config.yamlto match the versions now pinned inpyproject.toml/ support current Python, and add theastral-sh/uv-pre-commituv-lockhook..gitignoretemplate placeholder (src/_your_package_version.py→src/_generics_version.py) and acodespellfalse positive onuv.lock(added[tool.codespell] skip = "uv.lock").Job names/matrix keys for
pytest,check_packaging,black (black)/black (isort), andPython Code Quality and Lint (linting)/(type_check)were kept identical to what's currently pinned in the repo's branch protection ruleset's required status checks.Test plan
uv lock/uv sync --group devsucceed, project installs in editable modeuv run pytest— 27 passedUV_PROJECT_ENVIRONMENT=<scratch> uv sync --group X) forlinting,type_check,coverage,formatting,spellcheck— all pass with expected tool outputuv build+uv publish --dry-run dist/*succeedpre-commit run --all-files— all hooks pass (uv-lock, check-yaml, end-of-file-fixer, trailing-whitespace, black, isort)grep -rnE "setup-uv@v[0-9]+$" .github/workflows/returns nothing (no floating-major tags)🤖 Generated with Claude Code