-
Notifications
You must be signed in to change notification settings - Fork 16
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
CMORgasbord: yaml parsing #368
Conversation
return statement included before calling the run subtool- pprint out to screen instead
forgot the yamltools bit
turn on run-one-debug mode at top of testing script
fix minor syntax error causing all the failures
fix the import statements.
fix import statement
…ust import statements when join_constructor pops up
…verything in yamltools can just from . import * it. remove the (yaml)constructor arguments to yaml class constructors, remove the add_constructor bit from initializing since we get it by importing the yamltools directory now. remove dependence on combine_yamls when things like load_yaml or yaml_output are called- put these in helper and adjust statements everywhere where required. make attempt at sticking fre_logger into fre list calls- but actually this may need some thought about what we want since we are parsing std out for the unit tests...
OK! at this point, i did some cleaning up and refactoring to find my way better around now, lets get back to the real work where PR #363 (R.I.P.) was getting interesting, which was the following call |
...and that call was...
... which produces
but more importantly, the contents of that yaml were, via
so if we can get back here, preserving current testing results, we can definitely move forward with the approach |
…flag, default false. add the debug run one mode to the yaml processing calls as well.
…his red x into a green check. will adjust testing/config file needs as we go along to ensure we are writing sensible things
…regious assumption tha the gfdl name is going to be the mip name. i know this is not the case- just a prototype for possibly interfacing with slurm.
…what worked last time!
…combined yaml file
yay!
|
…e unit tests into existence and add in test case ive been running based on the am5 yaml etc. the contents of the yaml too must be checked
…ine-yaml test call add comparison conditions for lloading the fresh created output file and comparing to static test file data
…ot to test for the combination doing its job. test the combine_yamls as a python module call, and if the output combined yaml exists already, remove it before recreating
…statements in regrid app to logging.info statements
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.
Nothing showstopper just avoiding technical debt
…eady for pushing yet. address chan comments RE debug info and logging calls
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 great! @singhd789 there are a few yamls-related touches in here that you're probably already aware of (helpers.py)
from . import * | ||
|
||
|
||
def experiment_check(mainyaml_dir, experiment, loaded_yaml): |
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.
There seem to be some shared functions in here and in pp_info_parser.py
. These could probably eventually be cleaned and put in one script to use (like experiment_check
, combine_model
, combine_experiment
) - maybe in an abstract class you mentioned to me one time. This could probably be a clean-up in the aftermath of CMIP tasks though
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.
100% yes
Ian told me to dismiss this, keep momentum going!!
I told @singhd789 to dismiss @chanwilson to keep the stuff moving! |
Background
PR #363 was/is the pre-amble to this PR. This PR seeks to close issue #320, and make general improvements related to that as-needed.
Describe your changes
expanding this as i go. Currently we have:
fre cmor yaml
call input argumentsjoin_constructor
and puts it infre/yamltools/constructors.py
, to assist with avoiding circular import issues i encountered in PR 320.cmor yaml parsing #363, remove duplication of that code elsewhereoutput_yaml
,yaml_load
) and puts them infre/yamltools/helpers.py
, removed duplicates where applicableyaml
module gets imported and gets the!join
constructor' insidefre/yamltools/__init__.py
.yaml
module withjoin_constructor
import it viayamltools/__init__.py
logging
efforts infre/list_
, since, in that case, we kind of WANT thestdout
... so should ponder an intelligent work around and update the unittests forfre list
in near futureDEBUG_RUN_ONE_MODE
now a properclick
flag option forfre cmor run/yaml
calls, which should close CMORgasbord: make currentDEBUG_MODE_RUN_ONE
flag an optional arg tofre cmor run
#324 ! calledrun_one_mode
in CLI calls, andrun_one
withinfre/cmor
internalsrun_one_mode
flagfre/tests/test_fre_yamltools_cli.py::test_cli_fre_yamltools_combine_cmoryaml
fre/yamltools/tests/test_combine_yamls_script.py::test_combine_cmor_yaml
fre/yamltools/tests/AM5_example/cmor_yamls/cmor.am5.yaml
fre/yamltools/tests/AM5_example/COMPARE_TEST_OUTPUT_cmor.yaml
CMORYaml
class definition,fre/yamltools/cmor_info_parser.py
, which get leveraged for e.g. combining an un-parsed model yaml (AM5_example/am5.yaml
) with a model-specific cmor-tool-yaml (AM5_example/cmor_yamls/cmor.am5.yaml
)Issue ticket number and link (if applicable)
#320 and via sidequest, #324
Checklist before requesting a review
fre/list_
things i touched: need to consider how we handlefre list
stdout