-
Notifications
You must be signed in to change notification settings - Fork 39
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
Clearly separate fixes and CMOR checks #2157
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2157 +/- ##
==========================================
+ Coverage 93.14% 93.31% +0.17%
==========================================
Files 237 238 +1
Lines 12831 13035 +204
==========================================
+ Hits 11951 12164 +213
+ Misses 880 871 -9
|
Thanks @bouweandela for the review! 🚀 Apart from renaming |
Thanks for making the changes! |
Unfortunately I found an issue with this new implementation. Previously, the Since some datasets will always give you multiple cubes when loaded (e.g., the ones with a generic level coordinate will have additional cubes with coordinates like An easy way to fix this is to build the |
Sounds fine to me, that is quite similar to the current implementation |
Thanks @schlunma, LGTM! |
Superb work, gents - I can merge now if you guys ready-ready 🍺 |
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.
Lovely work 👍
Description
Current situation
At the moment, automatic fixes to datasets are done in the
CMORCheck
class via theautomatic_fixes
keyword. While this weird interconnection is not only conceptually awkward (why would we fix and check at the same time?), this also brings along performance issues since CMOR checks are done twice or even more often (#2154) for a given dataset. Especially for datasets with lots of individual files, this can add up (e.g., I found a 14% decrease in run time for an ICON recipe).Changes in this PR
This PR disentangles automatic fixes and CMOR checks in a fully backwards-compatible way (apart from the deprecations; see below).
All automatic fixes have been removed from the
CMORCheck
class and theautomatic_fix
keyword deprecated (see below). Moreover, a new classGenericFix
has been introduced that now takes care of ALL automatic fixes, which is added as a fix for all dataset. The CMOR checks within these fix functions are also deprecated (see below).Deprecations
automatic_fixes
ofCMORCheck
: use the functionsfix_metadata
,fix_data
, orDataset.load
(which automatically includes the first two functions) instead. CMOR Checks will not include fixes anymore in the future.check_level
infix_metadata
andfix_data
: use the functionscmor_check_metadata
,cmor_check_data
, orcmor_check
instead. Fixes will not check the data anymore in the future.Closes #2154
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
All checks below this pull request were successfulCodacy issues can/will not be fixed (the affected functions already had too much arguments).To help with the number pull requests: