Pin math-spec alpha.76 and drop the Power walk workaround - #946
Open
FBumann wants to merge 1 commit into
Open
Conversation
Build cost — v1 vs legacyv1 build peak & time relative to legacy, on this commit — not a comparison against master (that is CodSpeed).
Full table (time + peak, mean)📊 Interactive plots + CSV: download the semantics-report-v1-vs-legacy artifact from this run. Report-only · not a gate · refreshed on every push · obsolete once legacy is dropped. |
Collaborator
Author
|
@FabianHofmann Im going to merge this. And i pinned a proper tag of mathspec instead of a hash. Revert if you disagree |
math-spec's `program.children()` had no branch for `Power`, so every walk stopped there and a parameter written `d ** 2` was invisible to it. linopy worked around it with its own `children()` in `linopy/spec/nodes.py`. energy-models/math-spec#404 fixed it upstream, so the `spec` group pins the release that carries it, `v0.0.0-alpha.76`, and the walks call `math_spec.program.children` directly. The coverage tests for a constant side and a divisor hidden under a power stay as they are and now exercise the upstream walk. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017AvhrToZD5bch9Zcdtiduo
FBumann
force-pushed
the
spec/power-children
branch
from
September 8, 2026 14:51
53d8712 to
608e141
Compare
4 tasks
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.
Stacked on #922 — merge that one first.
Note
The following content was generated by AI.
Changes proposed in this Pull Request
#922 carries a workaround in
linopy/spec/nodes.py: math-spec'sprogram.children()had no branch forPower, so every walk stopped there anda parameter written
d ** 2was invisible to it — linopy shipped its ownchildren()that descended into a power's base and exponent.energy-models/math-spec#404 fixed that upstream (a
Powerbranch plus anassert_neverso a new node type can't be forgotten again), released asalpha.76. So:
specdependency group pins the math-spec tagv0.0.0-alpha.76instead of the alpha.75 commit hash
67aeedb.linopy/spec/nodes.pydrops itschildren()wrapper;walkand_dimscall
math_spec.program.childrendirectly, andcoverage.pyimports it frommath-spec too.
The two coverage tests for a parameter hidden under a power
(
test_a_parameter_under_a_power_is_still_checked_for_coverage, constant sideand divisor) are unchanged and now exercise the upstream walk.
Verification (608e141)
Checklist
AGENTS.md).doc.doc/release_notes.rstof the upcoming release is included. — no user-visible change; Build and change models via math-spec #922 is unreleased.🤖 Generated with Claude Code
https://claude.ai/code/session_017AvhrToZD5bch9Zcdtiduo