Skip to content

Release v26.3.1#5442

Closed
rtimms wants to merge 3 commits intomainfrom
release/v26.3.1
Closed

Release v26.3.1#5442
rtimms wants to merge 3 commits intomainfrom
release/v26.3.1

Conversation

@rtimms
Copy link
Copy Markdown
Contributor

@rtimms rtimms commented Apr 10, 2026

Summary

Patch release v26.3.1 cherry-picked on top of v26.3.0 with two bug fixes:

Release checklist

  • Review cherry-picked changes
  • Merge PR
  • Create GitHub release with tag v26.3.1 from release/v26.3.1 branch (not main)
  • Verify PyPI release: pip install pybamm==26.3.1
  • Open separate PR to update changelog on main (do NOT merge release branch back)
  • Delete release/v26.3.1 branch after tagging

🤖 Generated with Claude Code

rtimms and others added 3 commits April 10, 2026 14:44
* Fall back to BaseModel when custom model base class can't be imported

Restore the pre-#5389 contract where `Serialise.load_custom_model` always
produced a plain `BaseModel` when the recorded subclass isn't available in
the loading environment. Previously it raised `ImportError`, making models
authored in third-party packages unloadable by anyone without that package
installed, even though the model is stored fully symbolically.

Now the loader opportunistically re-imports the original class when
possible (preserving subclass-specific Python behaviour) and otherwise
warns and falls back to `BaseModel`.

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

* Test that li-ion BaseModel round-trips with options and defaults intact

Covers the common case of a custom model that subclasses (or is reparented
to) the lithium-ion BaseModel: after save + load, the recorded base class
is re-imported, the options are restored as BatteryModelOptions, and the
default_geometry / default_spatial_methods still cover the particle
domains — so Simulation can discretise without the caller passing any
extra geometry/submesh/spatial_methods dicts.

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

* Remove verbose inline comments

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

* Update changelog for #5441

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
(cherry picked from commit 428a181)
* replace edge eval override lambdas with standalone class

* add test

* Update CHANGELOG.md

(cherry picked from commit 00d8bbd)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rtimms rtimms requested a review from a team as a code owner April 10, 2026 13:47
@rtimms rtimms closed this Apr 10, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.31%. Comparing base (bee697c) to head (664f483).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5442      +/-   ##
==========================================
+ Coverage   98.24%   98.31%   +0.07%     
==========================================
  Files         330      336       +6     
  Lines       30072    30699     +627     
==========================================
+ Hits        29544    30183     +639     
+ Misses        528      516      -12     

☔ View full report in Codecov by Sentry.
📢 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.

@rtimms rtimms deleted the release/v26.3.1 branch April 10, 2026 14:40
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.

2 participants