Minimise duplication of the CDDS default request items#349
Minimise duplication of the CDDS default request items#349Zubair Maalick (zmaalick) wants to merge 34 commits intomainfrom
Conversation
Naomi Parsons (NParsonsMO)
left a comment
There was a problem hiding this comment.
The unit test for configure_standardise/bin/test_create_request_file.py::test_create_request fails.
I also think that the defaults file is not supposed to contain user-configurable variables.
Naomi Parsons (NParsonsMO)
left a comment
There was a problem hiding this comment.
One unit test is failing.
Two prior review comments have not been responded to.
Fix the unittest: ca8d9a0 |
Naomi Parsons (NParsonsMO)
left a comment
There was a problem hiding this comment.
Thanks Zubair Maalick (@zmaalick)!
Alistair Sellar (alistairsellar)
left a comment
There was a problem hiding this comment.
Thanks Zubair Maalick (@zmaalick)!
Emma Hogan (ehogan)
left a comment
There was a problem hiding this comment.
Thanks Zubair Maalick (@zmaalick) 🥳
...instead of writing a new file
to simplify conflicts with main
(missed in conflict merge)
|
Sorry, I did not mean to close this, I dropped my mouse! |
Naomi Parsons (NParsonsMO)
left a comment
There was a problem hiding this comment.
I really like the style of the function CMEW.app.configure_standardise.bin.create_request_file.create_request now, it's very readable.
I like it much more than all the nested information in CMEW/app/configure_recipe/bin/configure_recipe.py, but I know we did more away from using a reference file here... Is that a bit inconsistent?
I will approve if the workflow runs successfully but it seems to be stuck on the MASS step at the minute.
It has now passed fine and my last approval is still showing. |
Emma Hogan (ehogan)
left a comment
There was a problem hiding this comment.
Thanks Alistair Sellar (@alistairsellar)! 🥳
I agree with all Naomi Parsons (@NParsonsMO)'s comments on the request_defaults.cfg file; this file, as described in the issue, is for default values only, not those configurable by the user (hence the name). Would it be possible for the request_defaults.cfg file to contain only the default values, please?
| monkeypatch.setenv("EXPERIMENT_ID", "amip") | ||
| monkeypatch.setenv("INSTITUTION_ID", "MOHC") | ||
| monkeypatch.setenv("MODEL_ID", "UKESM1-0-LL") | ||
| monkeypatch.setenv("MODEL_ID", "HadGEM2-GC31-HH") |
There was a problem hiding this comment.
There's a tiny bit of consolidation that can be done here to minimise duplication; set:
model_id = "HadGEM2-GC31-HH"
then use model_id here and for model_id below (when creating the expected dictionary) 👍
There was a problem hiding this comment.
I'm not sure I understand this one. There is (before and after this PR) a duplicate specification of most of the items, e.g. INSTITUTION_ID, ROOT_PROC_DIR. Is MODEL_ID used differently in a way that I haven't spotted?
There was a problem hiding this comment.
Thanks for the explanation (offline). Python vars now added to remove duplicate values: 4435d33
|
Thanks for the review Emma Hogan (@ehogan)
Yes, that would be cleaner. Implemented in b6ff2a4. Ready for your re-review. |

Closes #209 .
PR creation checklist for the developer
<issue_number>above ☝️ been replaced with the issue number?mainbeen selected as the base branch?<issue_number>_<short_description_of_feature>?good first issuelabel) been added to the PR?Climate Model Evaluation Workflow (CMEW)project been added to the PR?Definition of Done for the developer
docdirectory) related to the change been updated appropriately, including the Quick Start section?PR creation checklist for the reviewer
<issue_number>above ☝️ been replaced with the issue number?mainbeen selected as the base branch?<issue_number>_<short_description_of_feature>?good first issuelabel) been added to the PR?Climate Model Evaluation Workflow (CMEW)project been added to the PR?Definition of Done for the reviewer
docdirectory) related to the change been updated appropriately, including the Quick Start section?