You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cylc.flow.unicode_rules.TaskNameValidator documentation states that workflows must start with an alphanumeric character, and contain only alphanumeric, -, +, %, and @ characters. However it can also contain _ characters, which is not documented.
Specifically this comes from using the \w regex class, which:
Matches Unicode word characters; this includes all Unicode alphanumeric characters (as defined by str.isalnum()), as well as the underscore (_).
This class also contains many characters outside the possibly expected [a-zA-Z0-9_], such as ⅓ (U+2153 Vulgar Fraction One Third), though these are likely less frequently used in workflows than underscores.
>>>"⅓".isalnum()
True>>>"日本".isalnum()
True
Expected Behaviour
Underscores should be contained in the documentation, probably also that other characters are supported, maybe by linking to the python isalnum str method. At least it should check that everyone is properly supporting Unicode.
The text was updated successfully, but these errors were encountered:
jfrost-mo
changed the title
Documentation for task names is slightly incorrect
Documentation for task name allowed characters is slightly incorrect
Aug 6, 2024
For future reference, as this is undocumented (doesn't need to be):
⅓ 12 ³eçàÙ感µ:!.^$-+_()/ is a valid setting key.
Two consecutive spaces, or any of the following characters, are forbidden in setting key: #=%@§€£*±;?¿¡`'"°¶®🐍[]{}<>\
These lists are not comprehensive.
This isn't of much use, except for arbitrary settings in [[[meta]]] sections. Obviously, keys in a task [[[environment]]] are more strict (must be legit shell variable names).
Description
The cylc.flow.unicode_rules.TaskNameValidator documentation states that workflows must start with an alphanumeric character, and contain only alphanumeric, -, +, %, and @ characters. However it can also contain
_
characters, which is not documented.Specifically this comes from using the
\w
regex class, which:This class also contains many characters outside the possibly expected
[a-zA-Z0-9_]
, such as⅓
(U+2153 Vulgar Fraction One Third), though these are likely less frequently used in workflows than underscores.Expected Behaviour
Underscores should be contained in the documentation, probably also that other characters are supported, maybe by linking to the python isalnum str method. At least it should check that everyone is properly supporting Unicode.
The text was updated successfully, but these errors were encountered: