ecFlow tool for early discussion#845
Draft
christinaholtNOAA wants to merge 5 commits intoufs-community:mainfrom
Draft
ecFlow tool for early discussion#845christinaholtNOAA wants to merge 5 commits intoufs-community:mainfrom
christinaholtNOAA wants to merge 5 commits intoufs-community:mainfrom
Conversation
Collaborator
Author
|
Using Jinja2 expressions and dereferencing made things 100x easier! I added support for variables under Tasks, too, just to make sure I was getting the full benefit. Using an instance variable for these refs also means that a user can reference higher-level variables at any level, and we don't need to pass around that dict. I'm not sure that NCO typically wants to do that, but it is a pattern that's used in Rocoto, so it might come in handy for some users. Here's the updated input YAML: And the output suite definition where I've referenced |
| raise | ||
|
|
||
| # Build up the new blocks in the suite definition | ||
| for i in range(len(repeat[primary_variable])): |
Collaborator
Author
There was a problem hiding this comment.
This logic got SO MUCH nicer with Jinja2 expressions!
maddenp-cu
reviewed
Mar 23, 2026
maddenp-cu
reviewed
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Synopsis
This is a very early prototype of a potential basis for an ecFlow tool that translates YAML to an ecFlow definition. I wanted to get some feedback before I go too much further.
In my working example, I'm testing with the following YAML:
And the result is:
At this point, I've added support for Suites, Families, and Tasks, but nothing else. The end goal is to have it look like this (more or less):
One key aspect that I haven't seen a solution for yet is the
repeatsupport that essentially behaves like a Rocoto metatask. I even stole the syntax of#var#as a reference to those repeated variables. I don't yet have the ability to reference those variables throughout, but I think it will be a relatively easy add as I am passing a references dict to all sub-levels of the tree.I've been testing with a super simple script:
Type
Impact
Checklist