Skip to content
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

Add "shortcuts" for Rocoto YAML to make it more concise for users. #630

Open
christinaholtNOAA opened this issue Oct 28, 2024 · 0 comments

Comments

@christinaholtNOAA
Copy link
Collaborator

From PR 268 in SRW:
It is convenient, and valuable in terms of its simplicity that we can hand an attrs: block to a function that simply creates XML attributes for the block's children, knowing that the input config passed validation; but IIRC cyclestr supports only certain predefined attributes, so we could also match keys against those, creating XML attributes for the ones we know represent those, and setting the XML element's text to the value: key's value. Combined with a previous comment, we might then be able to simplify

cyclestr:
  value: val

to

cyclestr: val

and

cyclestr:
  attrs:
    offset: offsetval
  value: val

to

cyclestr:
  offset: offsetval
  value: val

We might also consider changing the value: tag to content: to match the XML spec.

@christinaholtNOAA christinaholtNOAA converted this from a draft issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant