cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

Documentation for task name allowed characters is slightly incorrect

Open jfrost-mo opened this issue 6 months ago • 3 comments

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.

jfrost-mo avatar Aug 06 '24 16:08 jfrost-mo