Repository navigation
chore: release 0.4.0 - #926
Merged
Merged
Conversation
The 0.4.0 section holds all 15 pull requests merged since v0.3.0. Above them, the notes name each break in a file and in the Python API, and the rewrite for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5NaERV1RNkFNcrngYUefA
Closed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5NaERV1RNkFNcrngYUefA
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5NaERV1RNkFNcrngYUefA
The 0.4.0 notes name the refused inequality on a str or bool value as a change to make in a spec file, and list #931 and #934 under Language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vU4ni6oQbTr8PM7EaYqDu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015vU4ni6oQbTr8PM7EaYqDu
Contributor
Author
|
@brynpickering We should have updated the date. I wont fix it, but we need to take care next time. |
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.
What this changes
This PR renames
## Upcoming versionto## 0.4.0 (2026-10-21)and edits the section into the release notes. The diff isCHANGELOG.mdalone. When this PR merges, the workflow tagsv0.4.0and publishes the package. This PR replaces #884.The opening paragraph is the user's own text. The rest was rewritten at the user's request: "Rewrite the whole changelog", limited to the 0.4.0 section. Two later prompts set scope: "Update the 0.4.0 release PR accordingly" added #931 and #934 after they merged, and "Can we shorten each bullet point to the actually relevant, actionable thing for a user?" cut each migration bullet to what to change.
What the section holds
masks:toconditions:, and what a condition and a mask are. It also says that most modules are now private.conditions:rather thanmasks:#907, fix(language)!: a named expression whosedims:gives a dimension its expression is not indexed over is refused at load #898, fix(language)!: a condition that uses <, <=, > or >= on a str or bool value is refused at load #931, feat(cli)!:python -m mathspec diffcompares two specs in the canonical form, andcanonicalno longer rewrites or checks a file #874, fix(language): two files that declare their dimensions in different orders load to the same program #911 with feat(program): each expression node states the dimensions it is read over #899, and feat(spec)!: a spec written back out puts short lists and mappings of names on one line #871. Each item says what to change, in one sentence, with no reason.Spec, a program class takes its construct's name, and the docs call one named item an entry #855, refactor(api)!: the docs, the error messages and the program classes call a true-or-falsewhereexpression a condition rather than a predicate #904, refactor(language)!: a file names a condition underconditions:rather thanmasks:#907 and feat(program): each expression node states the dimensions it is read over #899, and the moved reference page. A table maps the fourmathspec.programnames whose meaning changed (Parameter,Variable,NamedExpression,NamedMask). Code that uses an old meaning raises no error, so that item keeps its one-sentence warning. The table goes from 0.3.x straight to 0.4.0, so it includes refactor(language)!: a file names a condition underconditions:rather thanmasks:#907's renames on top of refactor(api)!: a spec class ends inSpec, a program class takes its construct's name, and the docs call one named item an entry #855's.!and its link. The subject is rewritten as a plain sentence, so a line no longer matches its PR title word for word. feat(program): each expression node states the dimensions it is read over #899's line also gains a!, because every expression node now has a requireddimsfield. These are all the PRs onmainsincev0.3.0. fix(language): a case-when whose cases test different columns of one relation is refused when one row can meet both #934 merged into fix(language)!: a condition that uses <, <=, > or >= on a str or bool value is refused at load #931's branch, so it has a line but no commit of its own onmain. chore: the private names for parsing and resolving a condition say condition rather than where #909 is achoreand adds no line.Why
#884 was written on 2026-10-15 for seven PRs. Since then, ten more PRs have merged. Its notes also say that a 0.3.0 file still loads, which #907, #898 and #931 have made false. This branch starts again from
main, because #884 is 46 merge commits deep.Checks, and what was not done
Gates on
12bc26e:pixi run python -m tools.changelog check:releases 0.4.0 on merge.pixi run lint: passed.pixi run docs-build: no issues found.pixi run testpassed onacc2e3d(the merge ofmainat6088835, fix(language)!: a condition that uses <, <=, > or >= on a str or bool value is refused at load #931): 3065 passed, 1 skipped. Later commits change onlyCHANGELOG.md.compile-texdid not run. The session container cannot download the tectonic bundle, andCHANGELOG.mddoes not affect it. CI runs it.Claims checked against the code:
masks:is refused withunknown key 'masks' in the top level of the file. Valid keys: ….where:inside aconditions:entry is refused withValid keys: condition, description.program.Sumtakesdimsas a required keyword.SUPPORTED_VERSIONSis(0,)on bothv0.3.0andmain.__all__ofmathspec.programandmathspec.speconv0.3.0and onmain.v0.3.0,expressions.mdsays thatstrlabels compare bytewise, so the fix(language)!: a condition that uses <, <=, > or >= on a str or bool value is refused at load #931 item is a change from 0.3.x. The column-blind relation subject that fix(language): a case-when whose cases test different columns of one relation is refused when one row can meet both #934 fixes is inv0.3.0too (exclusivity.py:312).Not done:
dims:gives a dimension its expression is not indexed over is refused at load #898 also refuses a merge whose sum names a dimension no term is indexed over, and theg, texample for fix(language): two files that declare their dimensions in different orders load to the same program #911. The loader's message names the rewrite in each case.v0.3.0, 16 of the 62 example specs usemasks:.## Upcoming versionis added above the release. The next PR that owes a changelog line adds it.v0.4.0(feat(language)!: a missing row reads as the value the file names, andmissing: neutralis gone #894, docs(pypsa): a PyPSA schedule, weight or limit that the data leaves out is absent rather than zero, and a committable extendable unit is assumed to have its big-M #912, feat(spec): a spec writes back the fields its file wrote, and the canonical form writes no default #918, feat(spec)!: a loaded spec cannot be changed, so the file it writes back out is always the one its program comes from #923, feat(spec)!: a loaded spec is sorted by name and cannot be changed, writes back the fields its file wrote, and prints one canonical text for two files that differ only in order or spelling #924) are not in this release. They go into the next one. fix(language)!: a condition that uses <, <=, > or >= on a str or bool value is refused at load #931 was labelledv0.5.0, but it is onmain, so it ships in 0.4.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01B5NaERV1RNkFNcrngYUefA
https://claude.ai/code/session_015vU4ni6oQbTr8PM7EaYqDu