Skip to content

chore(deps): prune [dependency-groups] to what the environment actually needs - #133

Merged
tschm merged 1 commit into
mainfrom
prune-dependency-groups
Aug 4, 2026
Merged

chore(deps): prune [dependency-groups] to what the environment actually needs#133
tschm merged 1 commit into
mainfrom
prune-dependency-groups

Conversation

@tschm

@tschm tschm commented Aug 4, 2026

Copy link
Copy Markdown
Member

Why

Since rhiza #1380 every 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. A tool named by a --with flag earns nothing by also being declared in [dependency-groups].

Dropped

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 are less obvious than the rest, so both now carry a comment:

  • pandas is imported inside test_ewm_cov.py::test_matches_pandas_ewm_cov, not at module scope, so it does not appear 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.

Verification

Run locally against an --exact sync, so the pruned packages were genuinely absent rather than left behind by uv 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-tests
  • make hypothesis-test — 26 property tests

🤖 Generated with Claude Code

…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>
Copilot AI lite review requested due to automatic review settings August 4, 2026 06:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 typecheck dependency group and resets [tool.uv].default-groups back to ["dev"].
  • Empties (but keeps) the lint dependency group to satisfy the currently-synced rhiza pyproject structure test.
  • Regenerates uv.lock accordingly, 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 thread pyproject.toml
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 = []
@tschm
tschm merged commit 0a89671 into main Aug 4, 2026
60 checks passed
@tschm
tschm deleted the prune-dependency-groups branch August 4, 2026 06:22
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