-
-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrects "electrode diffusivity" error catch #4267
Corrects "electrode diffusivity" error catch #4267
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4267 +/- ##
========================================
Coverage 99.45% 99.45%
========================================
Files 288 288
Lines 22089 22092 +3
========================================
+ Hits 21969 21972 +3
Misses 120 120 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, thanks, @BradyPlanden – just one question since this was deprecated before the v24.1 release cycle and thus with the release of v24.1 (but incorrectly as far as I understand), so the plan would have been to remove it in v25.1 (three releases). Since the behaviour change is being made "not breaking" now but has existed beforehand, when should/could this be deprecated? It would help reduce the code for dependents like PyBOP where it has caused much trouble, I assume, so there's a case to be made for deprecating earlier.
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine
* fix: error catch for electrode diffusivity * refactor: update diffusivity error catch and test * tests: up coverage for diffusivity name catches * Update pybamm/util.py Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> --------- Co-authored-by: Eric G. Kratz <kratman@users.noreply.github.com> Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk> Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
* fix: error catch for electrode diffusivity * refactor: update diffusivity error catch and test * tests: up coverage for diffusivity name catches * Update pybamm/util.py Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> --------- Co-authored-by: Eric G. Kratz <kratman@users.noreply.github.com> Co-authored-by: Ferran Brosa Planella <Ferran.Brosa-Planella@warwick.ac.uk> Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Description
This reverts an incorrect change applied in #4179. This adds to the error catch for the old parameter name
"{domain} electrode diffusivity [m2.s-1]"
to use the new name, likewise if the new name"{domain} particle diffusivity [m2.s-1]"
is provided the error catch uses the old name.I've confirmed it fixes the MWE in #4176, and currently works with the old parameter name within PyBOP. A quick MWE to test this fix is below:
Fixes #4176
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: