feat: rename LinopyYamlError to LpspecError - #394
Conversation
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>
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
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 |
Closes #389. Supersedes #390, which GitHub auto-closed when its base branch (
docs/trim, now merged as #388) was deleted — same commit, same content, retargeted tomain.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: 32 insertions, 32 deletions, no alias, no shim.
No deprecation path, deliberately
An earlier draft 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 format --checkclean,pyrefly0 errors,mkdocs build --strictclean.Not marked
!for the reason above.🤖 Generated with Claude Code