-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix tests of process to work with the new FCIS restructure #148
Conversation
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 should be good, pending a clean-up of possibly redundant test fixtures
Co-authored-by: Marc White <mwhite1206@gmail.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.
Good to go!
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.
LGTM
Thank you @blimlim! |
The branch 145/fcis-architecture implements the big restructure of the
process
andcubewrite
functions, as described in #145. The main changes are:process()
, while all cube modification steps are moved to a newprocess_cubes()
function.process_cubes()
function absorbs any cube modification steps previously part ofcubewrite()
.Roughly
process()
becomes the "imperative shell", performing all the reading and writing, whileprocess_cubes()
forms the "functional core", performing cube modifications over several modular steps.The new structure caused the existing end to end tests of
process()
to break. This PR follows on from work in the branch 145/fcis-architecture-broken-test, in getting the tests to work. The changes are:process_cubes()
fix_time_coord
, which uses cube methods includingcube.coord_dims()
,cube.transpose
andiris.util.new_axis
which would be harder and fragile to implement in theDummyCube
.process
by checking that the output cubes were the same objects as the input cubes:process_cubes()
, asfix_time_coord()
andfix_pressure_levels
return new cubes rather than modifying in place. These assertions have been swapped to check that the names of the output cubes match what's expected, e.g:The target of this PR is the 145/fcis-architecture branch instead of main. There are several steps before that branch can be merged into main, and hence to try and make the PRs smaller and easier to review, I'll do separate smaller PRs into 145/fcis-architecture, and do a PR into main when all the steps are complete.
Any feedback or suggestions are welcome!