-
Notifications
You must be signed in to change notification settings - Fork 94
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
template vars: simpler syntax for defining a list of strings #5433
Comments
(Sounds sensible to me) |
That feels like a nice solution to the Rose Stem issue. |
Ok, I think we have agreement here (removing the question label), this seems to be the least nasty way of getting around our rose-stem issues. To close this issue we need only support the Proposed behaviour: #!Jinja2
{{ FOO }} $ cylc view -p -s 'FOO=["a", "b", "c"]'
['a', 'b', 'c']
$ cylc view -p +s FOO=a,b,c
['a', 'b', 'c']
$ cylc view -p +s FOO=a,"b,b",c
['a', 'b,b', 'c']
$ cylc view -p +s FOO=a, b, c
bash: b,: command not found Note the quotes in the third example can be solved using the logic implemented in this PR - #5587 |
Modification to proposal - It's not possible to use Front runners are
|
Possible additional examples
Are these reasonable @oliver-sanders ?
|
Template Variables
Currently we would define a list of strings like this:
This approach is highly flexible and supports other types e.g:
Rose Stem
The
rose stem
system has two options called--tasks
and--groups
which confusingly do the same thing. They set a Jinja2 variable calledRUN_NAMES
to a list of strings defined in comma separated format.E.G. This:
Is actually equivalent to this:
So, the
--tasks
and--groups
options are actually nothing to do withrose stem
at all, they are really just a shorthand for specifying template variables to Cylc. This is a bit obstructive as these arguments are only supported by therose stem
command itself, which only runscylc install
.Future Rose Stem Interface?
It would make things a lot if we could pull the
--tasks
option out ofrose stem
and have it specified directly to Cylc. However, this option is a bit lengthy to write out in full.We could make this easier by specifying a shortcut for defining lists of comma separated strings.
This might just be enough to allow us to deprecate the
--tasks
and--groups
options (leaving them in as a wrapper of course), opening up this functionality to other Cylc commands e.g.cylc validate
,cylc graph
andcylc vr
.The text was updated successfully, but these errors were encountered: