Remove legacy semantics at linopy 1.0 (Stage 3)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 257
- Forks
- 87
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 29
Description
[!NOTE]
The following was generated by AI.
Tracks the final Stage 3 of the v1 arithmetic-convention rollout (opt-in → default → 1.0): remove legacy semantics entirely, leaving only v1.
Prerequisite
- v1 is the default — #845. Legacy stays reachable via
options["semantics"] = "legacy"from the default flip (a pre-1.0 minor) through to 1.0 — however many minors that spans; this issue removes it at 1.0. Removing a documented opt-out is a breaking change, so it rides the 1.0 major.
The strip (at 1.0)
A dependency-ordered, mostly-mechanical checklist already exists in
arithmetics-design/legacy-removal.md. grep "LEGACY: remove at 1.0" finds
every inline marker. In summary:
- Drop the
semanticsoption,is_v1(),LinopySemanticsWarning, and every legacy warn/branch (config, semantics, expressions, variables, constraints). - Collapse the
*_v1/*_legacymethod pairs into single implementations. - Remove the MultiIndex machinery kept alive only for legacy — the
alignment.pylevel-projection subsystem, netcdf MI (de)serialize,assign_multiindex_safe, and the scatteredisinstance(..., pd.MultiIndex)guards. - Drop the legacy side of the test matrix (the
pytest.mark.legacycases and the dual-semantics parametrization).
Docs
- Re-frame
arithmetics-design/convention.md/goals.md— drop the "v1"/legacy framing once there is only one convention.
Full checklist: arithmetics-design/legacy-removal.md.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with arithmetics-design/legacy-removal.md and run grep "LEGACY: remove at 1.0" to map the dependency-ordered work. Check the v1 default prerequisite in #845, then review the listed config, semantics, expressions, variables, constraints, alignment.py, netcdf MultiIndex handling, and tests. Done means legacy semantics and framing are removed and the remaining test matrix passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, documentation, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100