Skip to content

Migrate requirements files to PEP 735 dependency groups#388

Open
tpvasconcelos wants to merge 6 commits into
mainfrom
219-dependency-groups
Open

Migrate requirements files to PEP 735 dependency groups#388
tpvasconcelos wants to merge 6 commits into
mainfrom
219-dependency-groups

Conversation

@tpvasconcelos

@tpvasconcelos tpvasconcelos commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Description

Move all development dependencies from requirements/*.txt files into PEP 735 [dependency-groups] in pyproject.toml, making pyproject.toml the single source of truth for project metadata and dev dependencies. This is the "Manage the Python project" item from #219.

Changes:

  • pyproject.toml: new [dependency-groups] table with cicd_utils, tests, docs, typing, and local-dev groups. The -r foo.txt includes from the old requirements files are expressed with { include-group = "..." }, and all comments (incl. the kaleido pin TODO) are preserved.
  • tox.ini: environments now use tox's native dependency_groups setting instead of deps = -r requirements/*.txt (hence requires = tox>=4.22 + tox-uv>=1.17). In the base [testenv] section, the tests group is scoped with factor conditionals (pytest,tests,coverage: tests) so that build-dists and pre-commit-* don't inherit test dependencies (verified locally: .tox/build-dists does not contain pytest).
  • Makefile: make install now runs uv pip install --editable . --group local-dev (the editable install used to live inside local-dev.txt).
  • .readthedocs.yaml: uses Read the Docs' native uv support (added April 2026): method: uv, command: sync, groups: [docs] replaces the two pip-based install steps. The RTD build for this PR should validate this.
  • MANIFEST.in: dropped the requirements/ include; requirements/*.txt files deleted.

Notes:

  • No behavior change in dependency resolution: dependencies remain unpinned, same as the old requirements files. Committing a uv.lock for reproducible dev/CI environments is a possible follow-up, tracked in Investigate full adoption of uv #219.
  • The dependabot pip ecosystem config keeps working against pyproject.toml (there was nothing version-pinned in the requirements files for it to bump anyway).
  • Locally validated: uv pip install --dry-run -e . --group local-dev resolves; tox -e pytest runs green; tox --notest -e typing,release-notes,docs-static,build-dists all build their envs with exactly the expected dependencies; all pre-commit hooks pass (incl. validate-pyproject, check-readthedocs, and check-manifest).

Related issues

Related to #219.

PR check list

  • Read the contributing guidelines.
  • Provided the relevant details in the PR's description.
  • Referenced relevant issues in the PR's description.
  • Added tests for all my changes. (N/A - packaging/CI config only; validated via tox + pre-commit + the RTD build on this PR)
  • Updated the docs for relevant changes. (N/A - the contributing guide's make init workflow is unchanged)
  • Changes are documented in docs/reference/changelog.md.
  • The CI check are all passing, or I'm working on fixing them!
  • I have reviewed my own code! 🤠

📚 Documentation preview 📚: https://ridgeplot--388.org.readthedocs.build/en/388/

@github-actions

This comment has been minimized.

@tpvasconcelos

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in 51a14bd. The only true conflict was requirements/tests.txt (deleted in this PR, modified in main) — kept the deletion since this PR migrates all deps to PEP 735 dependency groups. The tox.ini auto-merged cleanly, picking up the coverage threshold bumps (95→100% unit, 98→100% combined) from main while preserving the dependency_groups approach.

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (14e872d) to head (ac819a3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #388   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          674       674           
  Branches        88        88           
=========================================
  Hits           674       674           
Flag Coverage Δ
combined-src 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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