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

configure default jinja2 variables globally #4108

Open
oliver-sanders opened this issue Mar 4, 2021 · 2 comments
Open

configure default jinja2 variables globally #4108

oliver-sanders opened this issue Mar 4, 2021 · 2 comments
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

Motivation

Rose had an unpublicised feature for site portability where the name of the "site" could be configured in the Rose config. It would then be provided as a Jinja2 variable called ROSE_SITE.

Note: The ROSE_SITE variable provided by rose stem is set in an entirely different way and will remain in Rose2.

This is a pretty useful feature, however, it was never actually adopted by any sites making it totally useless.

This feature doesn't really fit into the role of Rose very well so would suggest moving it into Cylc.

Two options:

  1. Create a special global config called cylc site or something like that.
    • Provide this as a Jinja2 variable called CYLC_SITE or something like that.
  2. Create a global config section called template variables or something like that.
    • Provide all items defined here as Jinja2 variables.
    • This allows new portability features to develop, however, with some risk to suite portability.
  3. Create a global config [meta] section
    • Provide these items as Jinja2 variables called SITE_* or something like that.

We could encourage sites to adopt the site convention with the Cylc8 transition.

See the related cylc/cylc-rose#13

@oliver-sanders oliver-sanders added small question Flag this as a question for the next Cylc project meeting. labels Mar 4, 2021
@oliver-sanders oliver-sanders added this to the cylc-8.0.0 milestone Mar 4, 2021
@hjoliver
Copy link
Member

hjoliver commented Mar 15, 2021

Of the "two options" I prefer the second, and not the first or the third 😁

    1. "site" may be unnecessarily specific and presumptuous, e.g. sites with multiple distinct platforms might prefer several platform variables?
    1. maximum flexibility without presuming anything 👍 (we can recommend using a SITE variable, as an example)
    1. "meta" is supposed to be descriptive, but these variables may be more than merely descriptive.

@oliver-sanders oliver-sanders removed the question Flag this as a question for the next Cylc project meeting. label Mar 16, 2021
@oliver-sanders
Copy link
Member Author

VC - Option (2) it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants