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

enums as URIs: enhance documentation, fix behaviour #936

Open
2 tasks
Tracked by #54
mr-c opened this issue Jan 20, 2022 · 0 comments
Open
2 tasks
Tracked by #54

enums as URIs: enhance documentation, fix behaviour #936

mr-c opened this issue Jan 20, 2022 · 0 comments

Comments

@mr-c
Copy link
Member

mr-c commented Jan 20, 2022

CWL v1.0 - v1.2 define the type enum as a specialization of the Salad type EnumSchema which means that each of the symbols are either full URIs or the ending parts of URIs built from the base URI for the document [0].

The text of the standards does not directly say how to serialize type: enums on the command line, but the conformance tests[1] show that a short name is computed and used. Short names are mentioned in the v1.0 version of the CWL standards but not defined explicitly until v1.1: https://www.commonwl.org/v1.1/SchemaSalad.html#Short_names

enums being a URI might make them attractive for use in specifying the output format of File types, but currently cwltool only outputs the short name[2]. So the utility of the URI is lost in this circumstance.

[0] v1.0 Schema (the same for v1.1 and v1.2):

- name: InputEnumSchema

[1]

- tool: v1.0/anon_enum_inside_array.cwl

https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/anon_enum_inside_array.cwl
https://github.com/common-workflow-language/common-workflow-language/blob/main/v1.0/v1.0/anon_enum_inside_array.yml
The correct result is

first mus_musculus second homo_sapiens

not

first […]v1.0/v1.0/anon_enum_inside_array.cwl#second/mus_musculus second […]v1.0/v1.0/anon_enum_inside_array.cwl#second/homo_sapiens

[2] https://cwl.discourse.group/t/set-tool-output-format-string-from-workflow-inputs/524/10?u=mrc

Related issue here: #568
Related discussions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant