chore(deps): prune [dependency-groups] to what the environment actually needs - #133
Merged
Conversation
…ly needs Every rhiza gate provisions its own tooling on the fly — `uv run --with pytest --with pytest-cov ...` in `test`, `--with ty` / `--with mypy` in `typecheck`, `--with interrogate` in `docs-coverage`, `uvx pre-commit` (which runs the ruff hooks) in `fmt` — so a tool named by a `--with` flag earns nothing by also being declared here. That retires two whole groups. `typecheck` (ty, mypy) existed so `uv run ty check` resolved from the project environment, and with it the `[tool.uv] default-groups = ["dev", "typecheck"]` entry that made it default; the typecheck target injects both tools itself, so default-groups returns to ["dev"]. `lint` held ruff, which reaches the tree through the pre-commit hooks. uv.lock loses 265 lines. The `lint` KEY stays, empty: the synced .rhiza/tests/test_pyproject.py asserts a 'lint' group is declared. That assertion is gone in rhiza after #1484, so the key can go on the next template sync. Nothing leaves `dev` — every entry there is imported rather than injected, two of them less obviously than the rest: - pandas is imported inside test_ewm_cov.py::test_matches_pandas_ewm_cov rather than at module scope, so it does not show up in a top-level import scan. - pytest-timeout is not injected by `benchmark`, `hypothesis-test` or `stress`, and pytest.ini sets both `timeout = 60` and `filterwarnings = error` — so its absence is not a warning here but a hard "Unknown config option" failure. Verified green: make all (prek, deptry, licenses, ty+mypy, 305 tests at 100% coverage, 39 rhiza-tests) and make hypothesis-test (26 property tests). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR streamlines the project’s uv dependency-group setup so only packages that must exist in the project environment remain declared, relying on rhiza gates to provision their tooling via uv run --with ... / uvx instead.
Changes:
- Removes the
typecheckdependency group and resets[tool.uv].default-groupsback to["dev"]. - Empties (but keeps) the
lintdependency group to satisfy the currently-synced rhiza pyproject structure test. - Regenerates
uv.lockaccordingly, dropping now-unreferenced packages and updating dependency-group metadata.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Prunes [dependency-groups] (drop typecheck, keep empty lint) and updates uv default groups to reflect rhiza gate tool injection. |
uv.lock |
Updates locked dependency-group metadata and removes packages no longer required by declared groups. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+71
to
+75
| # Empty on purpose: ruff runs through the pre-commit hooks, which `make fmt` executes | ||
| # via uvx. The key stays because the synced .rhiza/tests/test_pyproject.py asserts a | ||
| # 'lint' group is declared; that assertion is gone in rhiza after #1484, so the key can | ||
| # go on the next template sync. | ||
| lint = [] |
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.
Why
Since rhiza #1380 every gate provisions its own tooling on the fly —
uv run --with pytest --with pytest-cov ...intest,--with ty/--with mypyintypecheck,--with interrogateindocs-coverage,uvx pre-commit(which runs the ruff hooks) infmt. A tool named by a--withflag earns nothing by also being declared in[dependency-groups].Dropped
Two whole groups:
typecheck(ty,mypy) existed souv run ty checkresolved from the project environment — and with it the[tool.uv] default-groups = ["dev", "typecheck"]entry that made it default. Thetypechecktarget injects both tools itself, sodefault-groupsreturns to["dev"].lintheldruff, which reaches the tree through the pre-commit hooks.uv.lockloses 265 lines.The
lintkey stays, empty: the synced.rhiza/tests/test_pyproject.pyasserts alintgroup is declared. That assertion is gone in rhiza after #1484, so the key can go on the next template sync.Nothing leaves
devEvery entry there is imported rather than injected. Two are less obvious than the rest, so both now carry a comment:
pandasis imported insidetest_ewm_cov.py::test_matches_pandas_ewm_cov, not at module scope, so it does not appear in a top-level import scan.pytest-timeoutis not injected bybenchmark,hypothesis-testorstress, andpytest.inisets bothtimeout = 60andfilterwarnings = error— so its absence is not a warning here but a hardUnknown config optionfailure.Verification
Run locally against an
--exactsync, so the pruned packages were genuinely absent rather than left behind byuv sync --inexact:make all— prek hooks, deptry clean, pip-licenses, ty + mypy clean (Success: no issues found in 33 source files), 305 tests at 100% coverage, 39 rhiza-testsmake hypothesis-test— 26 property tests🤖 Generated with Claude Code