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

Handle 'default' values and "minOccurs=0" in CWL from WPS-1 #17

Closed
10 tasks done
Tracked by #141
fmigneault opened this issue Mar 14, 2019 · 0 comments
Closed
10 tasks done
Tracked by #141

Handle 'default' values and "minOccurs=0" in CWL from WPS-1 #17

fmigneault opened this issue Mar 14, 2019 · 0 comments
Assignees
Labels
ci/tests Tests of the package and features feature/CWL Issue related to CWL support process/wps1 Issue related to WPS 1.x processes support triage/feature New requested feature.

Comments

@fmigneault
Copy link
Collaborator

fmigneault commented Mar 14, 2019

ref #12, #11

CWL: how to set default values
(1) https://www.biostars.org/p/221531/

Common Workflow Language User Guide - Essential Input Parameters
(2) https://www.commonwl.org/user_guide/03-input/

More details here:
(3) https://www.biostars.org/p/286135/
"default" generates "type": ["null", <other-real-type>] and "<type>?" is a shorthand for this same type definition

todo

  • add test when "default" is present for a LiteralData value
  • add test when "default" is present for a "File" reference
  • add test when "minOccurs"=0 is present for a LiteralData value ("default" as "null")
  • add test when "minOccurs"=0 is present for a "File" reference ("default" as "null")
  • add test when "maxOccurs">1 is present for a LiteralData value (coverted to "type": "array")
  • add test when "maxOccurs">1 is present for a "File" reference (coverted to "type": "array")
  • add test for shorthand "<type>?" by itself, and with every combination of above cases, as well as with multiple cases combined (validate all situations are handled correctly)
  • add test when "minOccurs">1, type should be converted to array automatically, maxOccurs should be updated accordingly to array methods as above.

extra

  • add test when "allowedValues" is present with a list of allowed values, which should resolve as enum type (relates to AllowedValues missing from process descriptions #41)
  • add test when "allowedValues" + ("default" and/or "minOccurs"=0 and/or "maxOccurs">1) are present, to validate that everything still resolves properly [see ref (3) for more details about potential failure for "enum?"]

edit
Could introduce new CWL methods to define int/float Range or string AllowedAalues (similar to enum) following outcome of common-workflow-language/common-workflow-language#764

For Workflows, see developments related to following spec:

@fmigneault fmigneault self-assigned this Mar 14, 2019
@fmigneault fmigneault added process/wps1 Issue related to WPS 1.x processes support triage/feature New requested feature. feature/CWL Issue related to CWL support ci/tests Tests of the package and features labels Mar 14, 2019
fmigneault added a commit that referenced this issue Mar 14, 2019
fmigneault added a commit that referenced this issue Mar 26, 2019
@fmigneault fmigneault mentioned this issue Jun 11, 2019
3 tasks
fmigneault added a commit that referenced this issue Jul 4, 2019
fmigneault added a commit that referenced this issue Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/tests Tests of the package and features feature/CWL Issue related to CWL support process/wps1 Issue related to WPS 1.x processes support triage/feature New requested feature.
Projects
None yet
Development

No branches or pull requests

1 participant