Skip to content

refactor(deps): split contributor extras into PEP 735 dependency groups#764

Draft
FBumann wants to merge 1 commit into
masterfrom
worktree-feat+dependency-groups-split
Draft

refactor(deps): split contributor extras into PEP 735 dependency groups#764
FBumann wants to merge 1 commit into
masterfrom
worktree-feat+dependency-groups-split

Conversation

@FBumann

@FBumann FBumann commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Refactor deps to modern "dependency-groupy". Also, update readthedocs to use uv directly.

Closes #763

Note

The following content was generated by AI.

What

Move the dev/contributor-only dependency sets out of [project.optional-dependencies] (extras) into [dependency-groups] (PEP 735):

  • → dependency groups: dev, docs, benchmarks
  • stay as extras: solvers, oetc, remote (runtime-facing — consumers install these from PyPI, so they belong in the wheel metadata)

Why

The contributor toolchains have no business shipping in the published wheel metadata. PEP 735 groups are the right home for them; they're never exposed to consumers and can't be pulled via pip install linopy[dev].

Implications for installers

how
extras (solvers, oetc, remote) pip install ".[solvers]" — unchanged
groups (dev, docs, benchmarks) uv sync --group dev / pip install --group dev (pip ≥ 25.1)

Groups are not reachable via the .[...] syntax, so this is a breaking change for contributors on pip < 25.1.

Call-outs for review

  • CI (test.yml, test-notebooks.yml): groups now installed via uv ... --group; runtime extras stay on the built wheel.
  • Read the Docs: switched to RTD's native uv install (method: uv, command: sync, groups: [docs]) — verified against the RTD config schema. This avoids depending on the RTD builder's system pip version.
  • claude.yml allowed_tools: updated to match the new install command.
  • Docs (README, contributing.rst, benchmarks/README) updated, incl. an explicit pip ≥ 25.1 note.

Draft — open question

Should dev move too, or only docs/benchmarks? Moving dev is the most invasive part (it changes the contributor onboarding command and the wheel-install step in test.yml). Flagging for maintainer preference.

Move the dev/contributor-only dependency sets (dev, docs, benchmarks) out
of [project.optional-dependencies] and into [dependency-groups], so they no
longer ship in the published wheel metadata. Runtime-facing extras
(solvers, oetc, remote) stay as extras.

Update every install reference accordingly:
- README, doc/contributing.rst, benchmarks/README: --extra/.[...] -> --group
- CI (test.yml, test-notebooks.yml): install groups via uv --group; keep
  runtime extras on the wheel
- claude.yml allowed_tools: match the new install command
- .readthedocs.yaml: install docs via native uv method (command: sync,
  groups: [docs]) instead of the pip "docs" extra
- document the pip >= 25.1 requirement for dependency groups in contributing.rst

Refs #763

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

Split dev-facing extras into PEP 735 dependency groups (and the pip ≥ 25.1 implication)

1 participant