Skip to content

chore: finish migration off pip-tools/tox onto uv - #1118

Merged
hf-krechan merged 1 commit into
mainfrom
chore/finish-uv-migration
Jul 31, 2026
Merged

chore: finish migration off pip-tools/tox onto uv#1118
hf-krechan merged 1 commit into
mainfrom
chore/finish-uv-migration

Conversation

@hf-krechan

Copy link
Copy Markdown
Collaborator

Summary

  • The repo had already moved dev dependencies to PEP 735 [dependency-groups] and dropped pip-compile'd dev requirements, but kept tox/tox-uv as an intermediate layer and still generated a top-level requirements.txt with pip-compile.
  • This finishes the migration: removes tox.ini and the top-level requirements.in/requirements.txt, and rewrites CI workflows to call uv sync --group <group> + uv run <tool> directly instead of uv run tox -e <env>.
  • Drops the packaging dependency-group (build, twine) in favor of uv build / uv publish --dry-run natively, and removes pip-tools from the dev group.
  • Adds [tool.uv] default-groups = [] so per-group CI jobs (linting, type_check, ...) don't silently also install the whole dev group.
  • Adds the astral-sh/uv-pre-commit uv-lock hook to keep uv.lock current automatically.
  • Updates README, contributing guide, .vscode/settings.json, and stale in-code comments that referenced tox.
  • docs/requirements.txt is intentionally kept — the sphinx-notes/pages action needs a standalone requirements file at a known path.

Test plan

  • uv lock — resolves cleanly, drops build/twine/pip-tools and their transitive deps
  • uv sync --group dev + uv run pytest — 107 passed
  • uv sync --group linting + uv run pylint src/bo4e / generate_or_validate_json_schemas.py — 10.00/10
  • uv sync --group type_check + uv run mypy on src/bo4e, tests, generate_or_validate_json_schemas.py — no issues
  • uv sync --group coverage + uv run coverage run/html/report --fail-under 99 — 99% (passes)
  • uv sync --group json_schemas + uv run python generate_or_validate_json_schemas.py --mode generate — matches CI invocation
  • uv sync --group docs + uv run python -c "import bo4e; print(bo4e.__gh_version__)" — works
  • uv build + uv publish --dry-run — builds sdist/wheel, dry-run exits 0
  • pre-commit run --all-files — all hooks pass, including the new uv-lock hook
  • grep -rnE "setup-uv@v[0-9]+$" .github/workflows/ — no floating-major tags
  • Real CI run on this PR (required status checks: tests (3.10/3.11/3.12, ubuntu-latest), Python Code Quality and Lint (3.12, ubuntu-latest, {linting,type_check,dev}), coverage (3.12, ubuntu-latest), formatting, Check Docs (3.12, ubuntu-latest)) — matrix job names were kept unchanged so required-check names still match

🤖 Generated with Claude Code

The repo had already dropped pip-compile'd dev requirements in favor of
PEP 735 dependency-groups, but kept tox (via tox-uv) as an intermediate
layer and still generated a top-level requirements.txt with pip-compile.

This drops that remaining layer: tox.ini and the top-level
requirements.in/.txt are gone, CI workflows call `uv sync --group X` +
`uv run <tool>` directly instead of `uv run tox -e X`, and the packaging
group (build/twine) is replaced by `uv build`/`uv publish --dry-run`
natively. Adds `default-groups = []` so per-group CI jobs don't
accidentally pull in the whole `dev` group, and a `uv-lock` pre-commit
hook to keep uv.lock current automatically.

docs/requirements.txt is intentionally kept - the sphinx-notes/pages
action needs a standalone requirements file at a known path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Completes the repository’s migration away from pip-tools/tox to a direct uv-based workflow by removing legacy requirements/tox config and updating CI + contributor docs to use uv sync --group … and uv run … directly.

Changes:

  • Removes tox.ini and top-level requirements.in / requirements.txt, and updates uv.lock accordingly (dropping pip-tools, build, twine, and related transitive deps).
  • Rewrites GitHub Actions workflows to run per-group CI tasks via uv sync --group <group> and uv run <tool> (tests, linting, type checks, coverage, docs, packaging).
  • Updates developer documentation and tooling: adds [tool.uv] default-groups = [], introduces uv-lock pre-commit hook, updates VS Code interpreter path, and refreshes tox-referencing comments.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Updates locked dependency graph to reflect removal of tox/pip-tools and packaging tool deps.
tox.ini Removes tox configuration entirely as part of the uv-only migration.
scripts/generate_docs_assets.py Updates documentation-generation prerequisites and local link paths to match the new uv/docs build layout.
requirements.txt Removes top-level pip-compiled requirements output.
requirements.in Removes top-level pip-compile input file.
README.rst Updates contributor instructions to run checks via uv groups instead of tox.
pyproject.toml Drops the packaging dependency group, removes pip-tools from dev, and sets tool.uv.default-groups = [].
generate_or_validate_json_schemas.py Updates module comments/instructions from tox-based to uv-group-based invocation.
docs/contributing_guide.rst Rewrites contributor workflow guidance to use uv sync/uv run directly (no tox).
.vscode/settings.json Points the Python interpreter to .venv/bin/python instead of .tox/....
.pre-commit-config.yaml Adds astral-sh/uv-pre-commit uv-lock hook to keep uv.lock current.
.gitignore Removes .tox/ ignore entry as tox is removed.
.github/workflows/tests.yml Runs tests via uv sync --group tests and uv run pytest.
.github/workflows/test_docs.yml Runs docs checks via uv (sync + schema generation + asset generation + sphinx-build + doctest).
.github/workflows/python-publish.yml Updates release workflows to use uv directly (tests, schema generation, docs build steps, and uv build).
.github/workflows/packaging_test.yml Replaces tox packaging env with uv build + uv publish --dry-run.
.github/workflows/linting.yml Replaces tox envs with group-specific uv sync + direct pylint/mypy/pre-commit commands.
.github/workflows/docs_latest.yml Updates docs deployment workflow to use uv sync and direct schema + asset generation steps.
.github/workflows/coverage.yml Runs coverage via uv sync --group coverage and direct coverage run/html/report.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hf-krechan
hf-krechan merged commit 449f54d into main Jul 31, 2026
19 checks passed
@hf-krechan
hf-krechan deleted the chore/finish-uv-migration branch July 31, 2026 07:23
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.

2 participants