Skip to content

Release v26.6.1.2 (patch)#5607

Closed
aabills wants to merge 6 commits into
patch-base/v26.6.1.1from
release/v26.6.1.2
Closed

Release v26.6.1.2 (patch)#5607
aabills wants to merge 6 commits into
patch-base/v26.6.1.1from
release/v26.6.1.2

Conversation

@aabills

@aabills aabills commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Patch release v26.6.1.2, cut from v26.6.1.1 per RELEASE.md "Cutting a patch release". PR base is patch-base/v26.6.1.1 (the v26.6.1.1 tag) so the diff is just the cherry-picked fixes + version bump, and the test matrix runs on the release branch before tagging.

Contents (cherry-picked from main, -x)

Excludes the #5573 "voltage as a state" breaking change (lands in the next feature release).

Release steps

Do not merge this PR — the release is tagged from the branch; merging would duplicate the cherry-picked commits onto the base.

🤖 Generated with Claude Code

MarcBerliner and others added 2 commits June 15, 2026 15:11
* Fix RegulariseSqrtAndPower corrupting state-independent bases

RegulariseSqrtAndPower replaced every Sqrt/Power node with RegPower,
including bases independent of the state such as pybamm.Parameter and
pybamm.InputParameter rate constants. With the default scale of 1 this
corrupts values below the regularisation tolerance (e.g. a ~1e-9 rate
constant raised to 0.5 evaluated ~470x too small), causing solver
failures or silently wrong overpotentials in user-supplied
exchange-current density functions.

Now only regularise bases that match a registered scale or depend on
the state (variable/state vector/time). State-dependent normalised
bases like (c_e / c_e_ref) ** (1 - alpha) used by built-in sets
(ORegan2022, Chayambuka2022) keep their default-scale regularisation,
and manually-created reg_power nodes (MSMR j0_j) are untouched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Add PR number to changelog entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 5946b8c)
* Harden serialisation round-trip tests; fix param-rebuild altitude and MSMR option gaps

Follow-up to the tuple-options fix, addressing issues found while hardening
the serialisation test suite.

Rebuild param at the right altitude. The previous fix rebuilt a loaded
lithium-ion model's `param` with an `isinstance` branch inside
`load_custom_model`. Replace it with a model-owned `_rebuild_param` hook
(no-op on `BaseModel`, overridden by the lithium-ion base model, which now
also uses it in `__init__`). `load_custom_model` calls the hook, so the
options setter stays free of param concerns and the fix lives where the
model owns its derived state (#5598).

Fix two MSMR option-validation gaps surfaced by option fuzzing. Both let an
invalid option set crash later in parameter construction with "invalid
literal for int() with base 10: 'none'" instead of raising a clean
OptionError:
- the all-or-nothing MSMR check missed MSMR inside a per-electrode tuple
  (`("MSMR", "single")`) because it compared the whole value to "MSMR";
- an all-MSMR model left on the default "number of MSMR reactions" ("none")
  passed validation, since the registry only lists that placeholder.

Harden the serialisation test suite:
- generative fuzzing of valid option dicts through to_json/from_json, with
  the construction guard narrowed to (OptionError, NotImplementedError) so
  real bugs surface instead of being silently rejected;
- deterministic tuple-option and int-dimensionality round-trip coverage;
- discretised round-trip now asserts structural identity, solution
  equivalence and event preservation, plus a non-default tuple option.

Co-authored-by: Alec Bills <alexanderallenbills@gmail.com>

* Address review: setter-owned param rebuild, per-electrode MSMR count, symptom assertion

- Move `_rebuild_param` into the `BaseBatteryModel.options` setter so the
  options-derived `param` is kept in sync automatically. Drop the now-redundant
  explicit calls in `lithium_ion.BaseModel.__init__` and `Serialise` deserialise.
  Repurpose the obsolete `test_rebuild_param_syncs_param_with_reassigned_options`
  into `test_options_setter_rebuilds_param`, asserting the new invariant.

- Fix an MSMR regression: validate `number of MSMR reactions` per electrode so a
  mixed cell (MSMR in one electrode, conventional with a "none" count in the
  other) is accepted again, while the genuine all-MSMR "none" default is still
  rejected early. Remove the now-dead `_is_positive_integer_count`; add
  `test_msmr_mixed_electrode_accepted`.

- Strengthen `_assert_param_matches_options` with a symptom-level check: a
  two-phase negative electrode must name its primary active-material fraction
  "Primary: ...", guarding a stale/no-op rebuild beyond the dict comparison.

* fix: MSMR option validation dependent on electrode domains

---------

Co-authored-by: Alec Bills <alexanderallenbills@gmail.com>
(cherry picked from commit 95db690)
@aabills aabills requested a review from a team as a code owner June 15, 2026 22:20
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (patch-base/v26.6.1.1@a9446b0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pybamm/expression_tree/operations/serialise.py 96.29% 2 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##             patch-base/v26.6.1.1    #5607   +/-   ##
=======================================================
  Coverage                        ?   98.07%           
=======================================================
  Files                           ?      339           
  Lines                           ?    31805           
  Branches                        ?        0           
=======================================================
  Hits                            ?    31194           
  Misses                          ?      611           
  Partials                        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

aabills and others added 2 commits June 16, 2026 11:41
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Brady Planden <55357039+BradyPlanden@users.noreply.github.com>
@BradyPlanden

Copy link
Copy Markdown
Member

Cherry picked #5608 and #5609 as well

rtimms and others added 2 commits June 16, 2026 13:07
* docs: fix dead links breaking linkcheck CI

Two notebook links 404 after the docs site reorganised, failing the
linkChecker job and the Read the Docs linkcheck pre_build step on every
branch:

- source/api/simulation.html -> source/api/simulation/simulation.html
- installation/gnu-linux-mac.html#optional-jaxsolver ->
  installation/index.html#optional-jaxsolver

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: ignore bpxstandard.com in lychee (WAF false positive)

The site is live but its LiteSpeed anti-bot WAF returns 415 to CI/datacenter
IPs, breaking the link checker even though the link is valid.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: re-trigger builds (transient GitHub 504s)

No code changes. Earlier failures (lychee, test-data downloads, RTD
sphinx-linkcheck) were all transient github.com 504 Gateway Timeouts on
live links, not real breakages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit cf4ae1e)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@BradyPlanden

Copy link
Copy Markdown
Member

Also including #5575

@BradyPlanden BradyPlanden mentioned this pull request Jun 16, 2026
@BradyPlanden

Copy link
Copy Markdown
Member

Ended up with enough changes to justify a new release of the month, superseded by #5617

@aabills aabills deleted the release/v26.6.1.2 branch June 16, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants