build: adopt PEP 735 dependency groups for dev/test/doc#75
Merged
Marius1311 merged 1 commit intomainfrom Apr 24, 2026
Merged
Conversation
Aligns cell-annotator with cookiecutter-scverse v0.7.0 by moving
development-only dependencies from `[project.optional-dependencies]`
to `[dependency-groups]` (PEP 735). Provider layers stay as
`optional-dependencies` since end users install them via `pip install
cell-annotator[openai]` etc.
Layout:
- `[dependency-groups]`:
- `dev` = pre-commit, twine
- `test` = Python test packages (pytest, coverage, flaky, pytest-cov)
- `doc` = Sphinx stack
- `[project.optional-dependencies]`:
- provider layers (openai, anthropic, gemini, all-providers, colors,
gpu, tutorials) — unchanged
- `test` thinned to a pointer at `cell-annotator[all-providers]` +
`cell-annotator[colors]`, so `pip install cell-annotator[test]`
still pulls the provider extras the suite exercises. Python test
packages are no longer duplicated here.
- `[tool.hatch.envs.*]`:
- switched `features = [...]` to `dependency-groups = [...]` for the
default, docs, and hatch-test envs.
- hatch-test also keeps `features = [ "test" ]` so the provider
extras flow in via the thin pointer above.
Docs:
- `docs/contributing.md` — pip recipe updated to use
`pip install --group dev --group test --group doc -e ".[test]"`
(pip 25.1+). uv recipe updated to `uv sync --all-extras --all-groups`.
Validation:
- `uv sync --all-extras --all-groups` resolves cleanly.
- `uv run --group test --extra test pytest` → 188 passed.
- `hatch env show -i` lists the hatch-test matrix correctly.
- `sphinx-build -M html docs docs/_build` succeeds with no warnings.
Part of #73.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
=======================================
Coverage 79.95% 79.95%
=======================================
Files 15 15
Lines 1237 1237
=======================================
Hits 989 989
Misses 248 248 🚀 New features to boost your workflow:
|
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.
Aligns cell-annotator with cookiecutter-scverse v0.7.0 by moving development-only dependencies from
[project.optional-dependencies]to[dependency-groups](PEP 735). Provider layers stay asoptional-dependenciessince end users install them viapip install cell-annotator[openai]etc.New layout
[dependency-groups](dev-only — not shipped in the wheel metadata):dev= pre-commit, twinetest= pytest, coverage, flaky, pytest-covdoc= Sphinx stack[project.optional-dependencies](install-time extras, unchanged for end users):openai,anthropic,gemini,all-providers,colors,gpu,tutorialstest— thinned to a pointer atcell-annotator[all-providers]+cell-annotator[colors]. The Python test packages no longer live here, so there's a single source of truth per audience.[tool.hatch.envs.*]— switchedfeatures = [...]todependency-groups = [...]for thedefault,docs, andhatch-testenvs.hatch-testalso keepsfeatures = [ "test" ]so the provider extras flow in via the thin pointer above.Docs
docs/contributing.md— pip recipe updated topip install --group dev --group test --group doc -e ".[test]"(requires pip 25.1+).docs/contributing.md— uv recipe updated touv sync --all-extras --all-groups.Validation
uv sync --all-extras --all-groupsresolves cleanly.uv run --group test --extra test pytest→ 188 passed.hatch env show -irenders thehatch-testmatrix with the expected dependencies.sphinx-build -M html docs docs/_buildsucceeds with no warnings.Notes
pip install cell-annotator[openai]still works exactly as before.cell-annotator[test]will continue to get the provider extras, but will now need to also pull--group test(or switch to uv / hatch) to get the Python test packages. We have no external consumer of[test]that I'm aware of.Part of #73. Stacks on #74.