Representing ecflow .def files in yaml #472
Replies: 6 comments 19 replies
-
@christinaholtNOAA - Any thoughts on these two directions? |
Beta Was this translation helpful? Give feedback.
-
Hi @benjamin-cash -- Sorry for the delay, the team has been consumed with other work and I, at least, have not had time to look into this. First thing, though: The "ecf/defs/aqm_cycled.def" link you gave above doesn't work. Could you edit it? I'd be interested in looking at the source configuration file for comparison to what you show here. Without knowing more, my immediate impression is that the first example makes better use of YAML's hierarchical nature, which I think is preferable to encoding structure in the key names as in the second example. I'd be wary of case sensitivity in key names, though in cases where there's an easy one-to-one mapping between UW YAML keys and component or workflow-engine keys it might be worth accepting this. Currently, however, UW YAML only uses lower-case, snake_case keys, and we map to component-required names where necessary. So, we might consider that approach. We might also want to consider if/how we could re-use information from the I see a trade-off between designing a concise, DRY config language in UW YAML that can then be expanded by the tool into the full configuration required by the component -- hard, but potentially rewarding in terms of ease-of-use; and basically mirroring the component configuration in UW YAML and doing less translation/expansion -- easier, but not necessarily very helpful to users, as they have to do much of what they would have done in the component configuration directly, except in YAML now (for better or worse -- maybe better, but there's also a mediating tool in play that has to strive to be bug-free). We have a series of tasks in our backlog to implement an ecFlow tool similar to the Rocoto tool we already have. Anything we figure out here could be captured for use in that work. |
Beta Was this translation helpful? Give feedback.
-
Hi @maddenp-noaa - Thanks for chiming in, and no worries on the slow reply. I know (or at least believe) this is not one of the tasks the team is currently working, so it's a bit on the back burner. Not sure why the link got mangled, here it is again (hopefully): https://github.com/ufs-community/ufs-srweather-app/blob/production/AQM.v7/ecf/defs/aqm_cycled.def |
Beta Was this translation helpful? Give feedback.
-
Was that |
Beta Was this translation helpful? Give feedback.
-
The reason for the case sensitivity in key names like PACKAGEHOME is because of the way ecflow.Edit is set up. It will accept a dictionary, setting the variable names to the keys and the values to the values. So if you are representing a workflow that has case sensitive variable names you either need case sensitive keys or a translation scheme. In the aqm .def file it looks like suite/family/task names are all lower case snake, and variable names are upper case snake, but I don't know how universal that is. |
Beta Was this translation helpful? Give feedback.
-
It sounds then like how to specify this kind of loop in the UW YAML config files has not been defined, is that correct? |
Beta Was this translation helpful? Give feedback.
-
I thought it might be easier to discuss this via github than slack. I'm interested in how one would represent ecf/defs/aqm_cycled.def as a yaml file.
One option looks something like this:
This is taking advantage of the fact that the ecflow api will, for example, accept a dictionary for Edit(), and thus you can add everything in the edit: block in a single command. Not everything can be done that way though, so you get some inconsistencies in representation. Another option would look more like:
This would use the same _name construction everywhere.
Beta Was this translation helpful? Give feedback.
All reactions