-
-
Notifications
You must be signed in to change notification settings - Fork 232
Should enums with identical structure but defined in separate locations be considered the same type? #308
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
Comments
I met this too. Is this fixed? |
…kflow-test Add test for embedded subworkflow
Hello! Anybody here? I have the same behavior:
|
Hello all, Sorry for the delay. I invite @tetron and @Stian to discuss if this is a bug or not. One approach is to externalize the type definition and import it into each CWL document that needs to refer to it: enum.yaml name: foo
type: enum
symbols: [a, b, c] enum-task.cwl #!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
requirements:
SchemaDefRequirement:
types:
- $import: enum.yaml
inputs:
enum_task_input: enum.yaml#foo
outputs: []
arguments: [echo, $(inputs.enum_task_input) ] enum-workflow.cwl #!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow
requirements:
SchemaDefRequirement:
types:
- $import: enum.yaml
inputs:
enum_workflow_input: enum.yaml#foo
outputs: []
steps:
task:
in:
enum_task_input: enum_workflow_input
out: []
run: enum-task.cwl $ cwltool --validate enum-workflow.cwl
/home/michael/cwltool/env/bin/cwltool 1.0.20171205210500
Resolved 'enum-workflow.cwl' to 'file:///home/michael/cwltool/enum-workflow.cwl'
Tool definition is valid Here is the relevant section of the user guide (which did not exist when this question was originally asked): http://www.commonwl.org/user_guide/19-custom-types/ [edited to remove the un-needed StepInputExpressionRequirement ] |
Since we have a workaround I am going to close this issue and we can continue at common-workflow-language/common-workflow-language#568 to discuss CWL's syntax and model for types |
@mr-c, sorry, but this doesn't look like a solution! It's not obvious to use 2 non-standard requirements to get expected behaviour! |
@serge2016 The I agree that this could be cleaner, so let's continue that discussion over in the CWL specification repository common-workflow-language/common-workflow-language#568 |
@mr-c, ok, thank you. |
Hi all!
Found
Type mismatch between source and sink
when trying to pass enum from workflow to task.To run the workflow:
cwl-runner --debug workflow.cwl job.json
workflow.cwl
task.cwl
job.json
Output log
The text was updated successfully, but these errors were encountered: