Skip to content

Documentation for task name allowed characters is slightly incorrect #6288

@jfrost-mo

Description

@jfrost-mo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is wrong :(

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions