Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for task name allowed characters is slightly incorrect #6288

Open
jfrost-mo opened this issue Aug 6, 2024 · 3 comments
Open
Labels
bug Something is wrong :(

Comments

@jfrost-mo
Copy link

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 jfrost-mo added the bug Something is wrong :( label Aug 6, 2024
@jfrost-mo jfrost-mo changed the title Documentation for task names is slightly incorrect Documentation for task name allowed characters is slightly incorrect Aug 6, 2024
@oliver-sanders
Copy link
Member

See also #6375

@elliotfontaine
Copy link

Currently, _ doesn't follow the same rule as -, +, % : it's allowed as the first character for task name.

@elliotfontaine
Copy link

elliotfontaine commented Sep 28, 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

No branches or pull requests

3 participants