Open jwarner8 opened 2 months ago
Testing solution which uses jinja2 parsing, etc. {% set level = 1.2 %} {% set formatted_level = level|string|replace('.', 'p') %}
One of my questions for the cylc surgery this afternoon is what characters are allowed in task names. After that, replacing invalid characters sounds like a sensible plan.
The allowed task names are documented here: https://cylc.github.io/cylc-doc/stable/html/user-guide/writing-workflows/runtime.html#cylc.flow.unicode_rules.TaskNameValidator
Describe the bug
Many recipes involving looping over variables or model levels to produce numerous plots. If we are iterating over values that include periods, etc. model half levels [0.5,1.5,2.5], parsing these values and creating a unique tasks in the Cylc workflow causes an error and the workflow fails to validate. This is because tasks would be named, for example, plot[var][modellev] would become plot_airtempertaure_0.5.
A possible solution for floats would be to parse '.' as 'p', etc. 0.5 -> 0p5. I can't think of any cases where variable names would involve periods,
How to reproduce
Steps to reproduce the behaviour:
1. 2. 3.
Expected behaviour
Environment
cset --version
]