-
Notifications
You must be signed in to change notification settings - Fork 119
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
[develop] Integrate jinja-templated workflow and add some rrfs workflow files. #721
[develop] Integrate jinja-templated workflow and add some rrfs workflow files. #721
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.
I do not think this will, in general work. We should work offline to discuss the design pattern and how new workflows should and can be added with the existing tools. The behavior of the existing tool will get us the full flexibility we need for RRFS.
Specifically, putting these switches in convolutes the process of building a workflow based on a configuration from component pieces. For example, if you want to modify cycles, it should be done by config file, not a switch defined in the workflow. Let me find some time to have a more thorough discussion about the options and why I don't think we want to go this direction.
@christinaholtNOAA Ok I will cose this PR. |
DESCRIPTION OF CHANGES:
This PR extends upon work done in PR #701 to integrate jinja support to config and workflow files. Enabling jinja in config/workflow files turned out to be not as straight forward as I expected. Some things that complicated things include
extend_yaml
that only renders jinja-templates in "values" of dictionaries. While this works just fine, wemay need jinja-templating throughout the config files e.g.
if-conditions
include
load a yaml config file and do not work when it is templated. The solution I used for this is to just copy/paste the files to be included. The jinja{% include %}
construct could potentially used but I haven't investigated furtherextend_yaml
has a dependency chain because it is referring to the same dictionary to update values. To render other templates, you will have to provide a secondary dictionary.setup.py
is modified to construct config files before workfow files.To test this functionality, I have added the RRFS workflow jinja-templated throughout. Where I think this may come in handly is in dependencies where a lot of jinja-template d code is used. The jinja-templated workflow files mirror that of the xml file.
I tested this setup in PR #647 where none of the RRFS tasks are added, so while it will generate the workflow, it needs to be tested/fixed as each task goes in.
This PR has modifications from PR#701 and PR#647 since it needs both for a successful RRFS_Dev workflow generation.
Type of change
TESTS CONDUCTED:
DEPENDENCIES:
DOCUMENTATION:
ISSUE:
CHECKLIST
LABELS (optional):
A Code Manager needs to add the following labels to this PR:
CONTRIBUTORS (optional):