Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Three different relationships to linopy were being explained in fragments across every page: it is not a runtime dependency, it is the differential oracle, and it is an opt-in shim for models already in memory. Conflating them is what made "the lanes" read as a structural theme rather than an implementation detail. docs/design/linopy.md now holds all three, and the rest stops mentioning it. SPEC loses 31 mentions down to two pointers. Most were internal guarantees dressed as language rules — "both lanes reject it at load time", "cannot make the lanes diverge", "what makes both lanes agree by construction". Those state that our two implementations agree, which is a correctness property of ours and not a rule about what a YAML file may contain; the reference now just states the rule. The rest explained our semantics by pointing at linopy — "as in linopy.Model.add_variables", "mirroring add_piecewise_formulation", "linopy's v1 arithmetic convention" — which tells a reader who has never used linopy nothing, and in every case the rule was already stated completely in the table above it. Section 8 keeps only the product path. The two paths genuinely accept different *data* inputs (#60) while accepting the same language, and interleaving them normalised the wart; that table moves to the linopy page where it reads as the open question it is. The pitch drops it too: README and index sold the benchmark as "against the eager lane's own best path", which asks a prospective user to know there are two before they know there is one. It is measured against linopy, so it now says so. ARCHITECTURE keeps every mention. The two-lane structure *is* the architecture there — hard rule 3, the four fences, the directory each lives in, all enforced by tests. That page's subject is internal structure. Filed while writing it: LinopyYamlError roots the public exception tree, so the only place a user of the pure-polars path meets the word "linopy" in normal use is the traceback of every error they hit (#389). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FBumann
force-pushed
the
fix/lpspec-error
branch
from
July 31, 2026 10:15
65467a3 to
852db0f
Compare
The old name dated from when this package was called linopy-yaml. It had become the sharpest place a dependency the product path does not have leaked into the surface: `lps.solve` goes YAML -> polars -> HiGHS and imports nothing from linopy, `lpspec.linopy` is not in `__all__`, and the bare-install CI job proves the whole suite runs without it — so on that path the only place a user met the word "linopy" in normal use was the traceback of every error they hit. Removed outright rather than aliased. The alpha stream carries no compatibility promise — the release tooling says so itself, refusing `!` and `BREAKING CHANGE:` on the grounds that there is nothing for the version to announce — so a deprecation shim would have been machinery in service of a guarantee we have not made. Migration is `except lps.LinopyYamlError` -> `except lps.LpspecError`, and `ValueError` catches everything either way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
FBumann
force-pushed
the
fix/lpspec-error
branch
from
July 31, 2026 10:21
852db0f to
1ad51b7
Compare
Collaborator
Author
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.
Closes #389. Stacked on #388 (base
docs/trim), because it editsdocs/design/linopy.md, which only exists there.The problem
lps.solvegoes YAML → polars → HiGHS and imports nothing from linopy.lpspec.linopyis not in__all__. The bare-install CI job runs the entire suite with linopy, xarray and pandas absent.And yet the root of the public exception tree was
LinopyYamlError— so on that path, the only place a user met the word "linopy" in normal use was the traceback of every error they hit, including errors about a parquet file.The change
A pure rename: 33 insertions, 33 deletions, no alias, no shim.
No deprecation path, deliberately
The first version of this PR kept
LinopyYamlErrorworking through a module__getattr__with aDeprecationWarning. That is gone, because the repo's own release tooling makes the argument against it: the conventional-commit gate refuses!andBREAKING CHANGE:while the version is pinned to the alpha stream, on the grounds that "the alpha stream carries no compatibility promise, so there is nothing for the version to announce."A deprecation shim is machinery in service of a guarantee we have not made. Removing it also keeps the declared surface exactly
__all__with nothing clever behind it.Migration
ValueErrorstill catches everything, as before —LpspecErrorsubclasses it.709 passed,
ruff checkclean,ruff formatclean,pyrefly0 errors,mkdocs build --strictclean.Not marked
!for the reason above.🤖 Generated with Claude Code