PyPSA / PyPSA/linopy

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

Open
#763 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependencies refactor
Dominant language
Python
Stars
257
Forks
87
Avg merge
1d 3h
Merged PRs (30d)
29

Description

THis will keep linopy up to date and the distributed package cleaner. Does any contributor use pip <25.1 and cant upgrade?

[!NOTE]
The following content was generated by AI.

Summary

Today every optional dependency set lives in [project.optional-dependencies] (extras): oetc, remote, docs, dev, solvers. We have no [dependency-groups].

Some of these are purely dev/contributor-facing (dev, docs, plus a benchmarks set) and have no business in the published wheel metadata. PEP 735 [dependency-groups] is the right home for them; runtime-facing extras consumers install from PyPI (solvers, oetc, remote) should stay as extras.

Proposal

Move the dev/contributor-only sets out of [project.optional-dependencies] and into [dependency-groups]. Keep user-facing runtime extras where they are.

Implication for pip users (the part that needs a heads-up)

Dependency groups are not extras, and pip treats them differently:

pip support how
optional-dependencies (extras) any pip pip install ".[dev]"
dependency-groups (PEP 735) pip ≥ 25.1 only pip install --group dev
  • The split is effectively a breaking change for contributors on pip < 25.1 — older pip has no support for groups at all.
  • Groups are not reachable via the .[...] syntax (pip install ".[dev]" would stop working for anything that moved), and they aren't published in wheel metadata.

So the move needs a documented pip path (in doc/contributing.rst) and a clear note about the pip ≥ 25.1 requirement, alongside the existing uv instructions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the project metadata where the current optional dependency sets are defined, separating dev, docs, and benchmark dependencies from the runtime extras. Read doc/contributing.rst and the existing uv instructions first. Done means contributor installation is documented for pip ≥25.1 and uv, the runtime extras remain available, and the moved groups no longer depend on the old extras syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, documentation
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.