-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add v5 upgrader scripts for XZInterpolation #1919
Add v5 upgrader scripts for XZInterpolation #1919
Conversation
Retain previous __str__ as `as_tree`
__delitem__, pop and rename
More in-line with BOUT++ style
Simplifies some logic in BoutOptions
Currently just "canonicalises" input files and adds "bout_version" option
Probably it would be good to start a section in the manual listing the breaking changes in 4->5, and the updater scripts that can be used to fix code/input files. @ZedThree could you add to this PR? |
Actually, might be better to add the section to the manual in #1920 as that will probably get merged first. Then we could merge |
There's a section in CHANGELOG.md that lists breaking changes. I'll just copy-paste that into the manual. Might be an idea to set up a PR template to remind us of things like this? I certainly forgot about it! |
Can we just import |
I think something like that should work. I'll do it in a separate PR though, and just note the breaking changes in CHANGELOG.md for now |
Two BOUT++ v4->v5 upgrader scripts for the XZInterpolation rename PR: one for the
Interpolation
types, one for the input files. Plus changes toboutdata.data.BoutOptions
required for the latter.1cdf2d1 is a PEP8 formatting commit, so touches a bunch of lines in
boutdata/data.py
The type upgrader optionally uses the python libclang bindings. These allow more powerful/accurate refactorings, but need libclang and the python bindings installed. Best installed through your system package manager.
I had to change
BoutOptions
to keep track of comments and the original case of keys so that writing to file resulted in a minimal diff. Unfortunately, it still results in some changes even if no input options need renaming:Because of this, the input file upgrader first shows the diff between the original and the "canonical" version.
I consider "canonicalising" all the input files in the repo, but there's a lot and it's mostly whitespace changes.