Support for PyBaMM v26.7#19
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.8and 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.
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.
PyBaMM v26.7 introduces a couple of breaking changes.
This PR makes some minimal fixes:
IDAKLUSolveras defaultvoltage_as_statein SPM(e) models to preserve pure ODE behaviour for the moment (but see Add support for DAE models with PathSim solvers #18)