feat(language): an open bound is null and an infinite bound is refused, the way mathspec 0.0.0-alpha.127 does - #1744
Merged
Merged
Conversation
…d, the way mathspec 0.0.0-alpha.127 does The pin moves from math-spec v0.0.0-alpha.122 to mathspec v0.0.0-alpha.127. The dependency now installs and imports as mathspec, so every import, URL and prose mention follows. The Read the Docs links keep the math-spec slug, which the site still uses. CHANGELOG.md and bench/reproduce.py.lock keep the old name, because they record releases and a frozen environment. mathspec 0.0.0-alpha.124 holds an open side of a variable bound as None rather than as an infinite constant, and refuses an infinite bound. Both engines now read None as the matching infinity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XdbYXKrogqppf3cPD932Dh
Documentation build overview
14 files changed ·
|
Documentation build overview
14 files changed ·
|
Merging this PR will not alter performance
Comparing Footnotes
|
…es, with no upper bound Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XdbYXKrogqppf3cPD932Dh
fluxopt-release-bot Bot
added a commit
that referenced
this pull request
Sep 25, 2026
🤖 I have created a release *beep* *boop* --- ## [0.0.1-alpha.357](v0.0.1-alpha.356...v0.0.1-alpha.357) (2026-09-25) ### Features * **language:** an open bound is null and an infinite bound is refused, the way mathspec 0.0.0-alpha.127 does ([#1744](#1744)) ([1b1dbef](1b1dbef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: fluxopt-release-bot[bot] <307443024+fluxopt-release-bot[bot]@users.noreply.github.com>
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.
Note
The following content was generated by AI.
The pin moves from math-spec
v0.0.0-alpha.122to mathspecv0.0.0-alpha.127. Every import, URL and mention saysmathspec. A variable bound's open side is nownull. Both engines read it as ±∞. An infinite bound is refused.Breaking: a spec that writes
upper: .inf(orlower: -.inf) no longer loads. Writenullor leave the side out. mathspec's refusal gives this rewrite.What changed, gates, and what was not run
Rename (energy-models/mathspec#702):
math_specbecomesmathspecandmath-specbecomesmathspecinsrc/,tests/,docs/,examples/,differential/,bench/,.github/,mkdocs.ymlandpyproject.toml. This includes thepypsa-paritycheckout ofenergy-models/mathspecand itsgrepfor the pin.math-spec.readthedocs.io, because mathspec kept that Read the Docs slug. All 48 distinct docs URLs still resolve against mathspec'sdocs/at the tag.CHANGELOG.md, because it holds released entries (mathspec did the same).bench/reproduce.py.lock, because it freezes an old environment at math-spec alpha.85.uv.lockcomes fromuv lock --upgrade-package mathspec.Open bounds (energy-models/mathspec#689, released in alpha.124):
VariableDeclaration.lower/upperareNoneon an open side. Before, they heldConstant(±inf).relational/engines/polars/compiler.py:boundsreadsNoneaslit(∓inf).linopy/builder.py:_boundreadsNoneas ∓inf._check_bounds_are_definedskips an open side.upper: .inf.test_json_carries_a_model_toonow assertsbounds.lower is None.test_infinite_bounds_survive_the_handoffbuilds its open side asupper=Noneand no longer asConstant(inf), which mathspec no longer produces. It now fails when the polars engine reads an open upper side as1e9.inf. A nulllb/ubalready means a bound parameter has no value there. So the open side becomes ±∞ where each engine reads the bound, and nothing downstream changes.Other upstream changes that reached tests:
limits.mdand no longer at "a declared escape".test_an_unknown_operator_names_its_context_and_teaches_the_rewritenow assertsmacroin place ofescape.examples/walkthrough.outis regenerated with--update-golden. It changes the module name and that message.Gates. pixi's installer is blocked here (403), so these ran in a uv venv with Python 3.12, the
linopy,gurobi,xpressextras and thedevgroup:ruff check .: clean.ruff format --check .: 327 files already formatted.pyrefly check, both configurations: 0 errors.pytest -q -n 8: 4033 passed, 319 skipped, 1 xfailed.origin/mainon alpha.122 gives the same counts.pytest bench/test_harness.py: 149 passed, 6 skipped. It ran with--i-know-another-is-running, because the load average was still falling after the suite and nothing else was running. These tests check objectives, not timings.zensical build --strict: no issues.pytest tests/test_docs_math.py: 69 passed.Not run:
test-floors, and the PyPSA parity gate (differential/pypsa/parity.py). This diff changes only a docstring in the parity script. The parity gate still reads the new corpus.🤖 Generated with Claude Code
https://claude.ai/code/session_01XdbYXKrogqppf3cPD932Dh