cylc-flow
cylc-flow copied to clipboard
Documentation for task name allowed characters is slightly incorrect
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:
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.