Skip to content

Support for PyBaMM v26.7#19

Merged
DavidMStraub merged 5 commits into
pathsim:masterfrom
DavidMStraub:pybamm_26_7
Jul 21, 2026
Merged

Support for PyBaMM v26.7#19
DavidMStraub merged 5 commits into
pathsim:masterfrom
DavidMStraub:pybamm_26_7

Conversation

@DavidMStraub

Copy link
Copy Markdown
Collaborator

PyBaMM v26.7 introduces a couple of breaking changes.

This PR makes some minimal fixes:

  • Use IDAKLUSolver as default
  • Set voltage_as_state in SPM(e) models to preserve pure ODE behaviour for the moment (but see Add support for DAE models with PathSim solvers #18)
  • Pin PyBaMM to the current minor version as upper bound to guard against unhandled breaking changes in future releases

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates pathsim-batt to remain compatible with PyBaMM v26.7’s breaking solver/model-option changes, while keeping the ODE-only blocks working as before and guarding against future minor-version breakage.

Changes:

  • Switch default PyBaMM build/discretisation solver to pybamm.IDAKLUSolver().
  • Inject legacy SPM/SPMe options ("voltage as a state": "false", "surface form": "false") to keep ODE-only blocks operating on pure ODE systems under PyBaMM ≥ 26.7.
  • Upper-bound PyBaMM dependency to <26.8 and update CI matrix to cover 26.7 plus older supported versions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/pathsim_batt/cells/pybamm_cell.py Generalizes option injection, forces legacy ODE discretisation for SPM/SPMe on PyBaMM 26.7+, and switches default solver to IDAKLU.
tests/cells/test_lead_acid.py Clarifies why CasadiSolver is still used explicitly for LOQS co-sim on PyBaMM < 26.7.
README.md Updates compatibility note about LOQS Jacobian behavior and solver selection across pinned PyBaMM versions.
pyproject.toml Adds an upper bound on PyBaMM (<26.8) to prevent unvetted minor-version breaking changes.
.github/workflows/test.yml Moves “latest” CI testing to PyBaMM 26.7 and extends the matrix to include 26.6 in the “older versions” coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test.yml
@DavidMStraub
DavidMStraub merged commit 3efd2ac into pathsim:master Jul 21, 2026
11 checks passed
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