-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Fixes breaking changes from #3624 #4072
Fixes breaking changes from #3624 #4072
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4072 +/- ##
========================================
Coverage 99.54% 99.54%
========================================
Files 287 287
Lines 21744 21753 +9
========================================
+ Hits 21646 21655 +9
Misses 98 98 ☔ View full report in Codecov by Sentry. |
Out of curiosity, if we did the renaming of the parameter, where is the old name coming from in PyBaMM usage? In #4071 it looks like you manually passed the old name into the function. Is there another tool in the PyBaMM ecosystem that is still using the old name? |
Fair question. The previous name would be used in any script/notebook/package built before v24.5, and in those cases, if |
I know we have deprecation warnings for the parameter name changes, I think if anything we should update them to catch it better. Putting it is the base solver seems like the wrong approach. Once we are out of the deprecation window then we would expect to be able to remove the code checking for it. |
I agree it's not a very clean solution, but given the How do we track removal of depreciated code at the moment? Perhaps adding depreciation warnings around the additions in this PR and adding them to a log for removal after two release would ensure they get removed when ready. |
We discussed about deprecation warnings in #2028 a while ago, but not much progress has been made. |
Can you share the scripts that are broken on |
Summary of my comments from the meeting: "Can the check for the old parameter name be done only in the update function and add a warning" |
Sure @valentinsulzer, any of these with the old parameter name used in
Yep, I'll sort this and drop a line once it's ready for review. |
Nice preview of how painful it is to rename a parameter, for you guys leading the parameter refactor effort |
… ParameterValues staticmethod Fixes an incorrect conversion of electrode diffusivity to particle diffusivity, Updates the corresponding test to ensure FuzzyDict.__getitem__ functions correctly, Adds conversion and checks to BaseSolver inputs object,
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.
Looks good to me, thanks! It would be good to get a second review, just for a second opinion on how to handle the warnings. BTW, could you add a line to the CHANGELOG?
There are a few tests that are failing periodically at the moment, but it seems to be across the repo. For coverage, the lines in question are being missed periodically, but not as a function of this PR. This should be good for the final review now. |
* removes breaking change from electrode diffusivity -> particle diffusivity * Add conditional entry for base_solver inputs recreation * fix: incorrect depreciated parameter translation, moves conversion to ParameterValues staticmethod Fixes an incorrect conversion of electrode diffusivity to particle diffusivity, Updates the corresponding test to ensure FuzzyDict.__getitem__ functions correctly, Adds conversion and checks to BaseSolver inputs object, * Add changelog entry --------- Co-authored-by: Eric G. Kratz <[email protected]>
Description
This PR updates
ParameterSet.update()
andSolver.solve()
so that #3624 is non-breaking.Fixes #4071
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: