feat(deps): centralise dev deps via PEP 735 + uv.lock#1068
Merged
Conversation
Closes #897. Replace the 14 dev_requirements/*.in/*.txt files with PEP 735 dependency groups in pyproject.toml and pin them via uv.lock, rewired into tox via tox-uv. Single source of truth, single lock file, no more pip-compile loop per group. What changed ------------ - pyproject.toml: new [dependency-groups] section with tests, coverage, type_check, linting, formatting, packaging, json_schemas, docs, and a `dev` meta-group that includes them all plus pre-commit and pip-tools. Groups use {include-group = ...} where they share deps (e.g. linting includes docs and json_schemas). - tox.ini: [tox] requires tox>=4.21 and tox-uv>=1.16. Each [testenv:*] swaps `deps = -r dev_requirements/...` for `dependency_groups = <name>`. The `python -m pip install --upgrade pip` warm-up is gone — tox-uv uses uv, not pip. Editable-install behaviour is now declared once at [testenv] level via `package = editable`. - .github/workflows/*: every `pip install tox` becomes `pip install tox tox-uv`. Two places that bypassed tox and pip-installed dev_requirements directly (python-publish.yml check_version_tag and build-n-publish; python-publish- scheduled.yml build-n-publish) now use `pip install uv` then `uv pip install --system [--group ...] ...`. - .github/dependabot.yml: drop the /dev_requirements/ pip entry; the / entry covers both runtime and PEP 735 groups now. - dev_requirements/: deleted in its entirety (14 files). - README.rst: new "Entwicklungs-Setup" section pointing at uv + tox-uv. - docs/contributing_guide.rst: replace the stale link to the Hochfrequenz python_template_repository with concrete uv-based steps for this repo. uv.lock — host-side step required --------------------------------- uv.lock is NOT included in this commit. PyPI is unreachable from the sandbox where this branch was prepared, so `uv lock` can't run here. Before merging, run uv lock on a host with PyPI access and amend the resulting `uv.lock` to this branch. Without it, `tox-uv`'s default runner (non-lock mode) still works — it just resolves fresh each env-create. Verification ------------ In-sandbox sanity checks only: - python3 -m tomllib parses pyproject.toml. - configparser parses tox.ini and lists all expected sections. - Workflow YAML files have correct EOL and no tabs. End-to-end verification (`tox -e tests` / `tox -e docs` etc.) needs uv.lock and PyPI access, so will land in CI on first push. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Run `uv lock` against pyproject.toml's runtime deps and the dependency-groups added in ad1c406. Resolved 133 packages; no manifest edits required. Verified locally: - `tox -e tests` builds an editable bo4e under .tox/tests with tox-uv and runs the full suite: 121 passed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI on the first push of this branch installed pylint 4.0.5 even though uv.lock pinned 3.3.9, because tox-uv's default runner is `uv-venv-runner`, which calls `uv pip install` against pyproject and never consults the lock. That defeats the point of committing uv.lock and reproduced the divergence the old per-group pip-compile setup had. tox.ini: switch [testenv] to `runner = uv-venv-lock-runner`, so every env-create is a `uv sync --group <name>` against uv.lock. pyproject.toml: cap `pylint<4` in the linting group. The previous dev_requirements/requirements-linting.txt pinned `pylint==3.3.9` because `.pylintrc` uses the (now-removed) `suggestion-mode` option and generate_or_validate_json_schemas.py has a `PARSABLE_CLASS_TYPE` constant that pylint 4 rejects. The pylint 4 migration is out of scope for this PR; the cap defers it cleanly. uv.lock: regenerated. Collapses the prior `pylint v3.3.9, v4.0.5` fork (caused by `requires-python = ">=3.9"` plus pylint 4 dropping 3.9 support) to a single `pylint==3.3.9` row. Similar collapses for astroid (3.3.11) and isort (6.1.0). Verified locally with the lock-runner: - tox -e linting -> OK - tox -e type_check -> OK - tox -e coverage -> OK (99% coverage, threshold 99) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Closes #897.
dev_requirements/*.in/*.txtfiles with PEP 735[dependency-groups]inpyproject.toml(tests, coverage, type_check, linting, formatting, packaging, json_schemas, docs, plus adevmeta-group).tox-uv:[testenv:*]now usedependency_groups = …instead ofdeps = -r dev_requirements/…. Editable install declared once at[testenv]level viapackage = editable.pip install tox→pip install tox tox-uv. The two workflow steps that bypassed tox (python-publish.ymlandpython-publish-scheduled.yml) now usepip install uv+uv pip install --system --group …./dev_requirements/dependabot pip entry — the root entry covers PEP 735 groups too.uv.lock(133 packages, generated against the new groups).docs/contributing_guide.rst: new "Entwicklungs-Setup" section pointing at uv + tox-uv (replaces the stale link topython_template_repository).Test plan
tox -e tests— 121 passed locally withtox-uv, editable bo4e built via hatchling.tox -e lintingtox -e type_checktox -e coveragetox -e docs🤖 Generated with Claude Code