Skip to content

Migrate dev tooling from pip-tools/tox to uv#257

Open
hf-krechan wants to merge 1 commit into
mainfrom
migrate-to-uv
Open

Migrate dev tooling from pip-tools/tox to uv#257
hf-krechan wants to merge 1 commit into
mainfrom
migrate-to-uv

Conversation

@hf-krechan

Copy link
Copy Markdown

Summary

  • Move dev-tool extras (tests, coverage, linting, type_check, spellcheck, formatting) from [project.optional-dependencies] to PEP 735 [dependency-groups] in pyproject.toml, plus a dev group bundling them for local setup (mirroring the old tox dev env, minus packaging tooling).
  • Drop the test_packaging group (build/twine) entirely — uv build and uv publish --dry-run replace them natively with no dependency group needed.
  • Remove tox.ini, requirements.txt, requirements.in; add uv.lock (generated via uv lock).
  • Set [tool.uv] default-groups = [] so a bare uv sync/uv run doesn't silently pull in the dev group.
  • Rewrite all .github/workflows/*.yml to use astral-sh/setup-uv@v9.0.0 + uv sync --group <x> + uv run --group <x> <tool> instead of pip install tox + tox -e <x>; packaging_test.yml and the publish job now call uv build/uv publish --dry-run directly.
  • Update .github/dependabot.yml ecosystem from pip to uv.
  • Bump stale black (22.10.0 → 26.5.1), isort (5.10.1 → 8.0.1), and pre-commit-hooks (v4.3.0 → v6.0.0) pins in .pre-commit-config.yaml to match the versions now pinned in pyproject.toml / support current Python, and add the astral-sh/uv-pre-commit uv-lock hook.
  • Fix a stale .gitignore template placeholder (src/_your_package_version.pysrc/_generics_version.py) and a codespell false positive on uv.lock (added [tool.codespell] skip = "uv.lock").

Job names/matrix keys for pytest, check_packaging, black (black)/black (isort), and Python 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 dev succeed, project installs in editable mode
  • uv run pytest — 27 passed
  • Per-group isolated syncs (UV_PROJECT_ENVIRONMENT=<scratch> uv sync --group X) for linting, type_check, coverage, formatting, spellcheck — all pass with expected tool output
  • uv build + uv publish --dry-run dist/* succeed
  • pre-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)
  • CI on this PR (not required before opening per task instructions)

🤖 Generated with Claude Code

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>
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