Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,30 @@
doc: Test workflow scatter with single scatter parameter and two valueFrom using $inputs (first and current el)
tags: [ scatter, step_input, workflow ]

- job: tests/empty.json
output: {"result": [
{
"class": "File",
"checksum": "sha1$4bb9bb2748a4380f12c039a9c2268115b816a6de",
},
{
"class": "File",
"checksum": "sha1$cf42ecac010c90a72257a573a5ce7efb7d6f0e08",
}
]}
tool: tests/scatter-defaults.cwl
id: scatter_all_input_defaults
doc: Test workflow scatter with single scatter parameter and two default inputs
tags: [ scatter, workflow ]

- job: tests/bwa-mem-job.json
output:
out1: [ "foo 1", "foo 2", "foo 3", "foo 4"]
tool: tests/scatter-valuefrom-default.cwl
id: wf_scatter_valuefrom_default
doc: Test workflow scatter with single scatter parameter, a valueFrom in the WorkflowStep and a default value inside the step
tags: [ scatter, step_input, workflow ]

- job: tests/import_schema-def_job.yml
output:
output_bam:
Expand Down
47 changes: 47 additions & 0 deletions tests/loop/default-stepinput-loop.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.3.0-dev1
class: Workflow
requirements:
InlineJavascriptRequirement: {}
ScatterFeatureRequirement: {}
StepInputExpressionRequirement: {}
SubworkflowFeatureRequirement: {}
inputs: []
outputs:
o1:
type: int[]
outputSource: loop/o1
pickValue: all_non_null
steps:
loop:
when: $(inputs.i1 < 20)
loop:
i1:
valueFrom: $(inputs.i1 + 5)
outputMethod: all_iterations
run:
class: Workflow
inputs:
i1: int
outputs:
o1:
type: int?
outputSource: big_values/o1
steps:
big_values:
when: $(inputs.i1 >= 5)
run:
class: ExpressionTool
inputs:
i1: int
outputs:
o1: int
expression: >
${return {'o1': inputs.i1 + 3};}
in:
i1: i1
out: [ o1 ]
in:
i1:
default: 5
out: [ o1 ]
9 changes: 9 additions & 0 deletions tests/loop/test-index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@
o1: [8, 11, 14, 17, 20]
doc: "Test a loop whose source has a default value"
tags: [ conditional, loop, inline_javascript, scatter, workflow ]

- job: single-var-loop-job.yml
tool: default-stepinput-loop.cwl
id: loop_default_stepinput
output:
o1: [8, 13, 18]
doc: "Test a loop whose source has a default value updated by a valueFrom directive"
tags: [ conditional, loop, inline_javascript, scatter, workflow ]

21 changes: 21 additions & 0 deletions tests/scatter-defaults.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
class: Workflow
cwlVersion: v1.3.0-dev1

requirements:
ScatterFeatureRequirement: {}
SubworkflowFeatureRequirement: {}

inputs: []
outputs:
result:
type: File[]
outputSource: step1/result

steps:
step1:
run: floats_small_and_large_nojs.cwl
in:
annotation_prokka_evalue:
default: [0.1, 0.2]
out: [ result ]
scatter: annotation_prokka_evalue
39 changes: 39 additions & 0 deletions tests/scatter-valuefrom-default.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
class: Workflow
cwlVersion: v1.3.0-dev1

requirements:
StepInputExpressionRequirement: {}
SubworkflowFeatureRequirement: {}
ScatterFeatureRequirement: {}
InlineJavascriptRequirement: {}

inputs:
min_std_max_min: int[]

outputs:
out1:
type: string[]
outputSource: step1/out1

steps:
step1:
run:
class: Workflow
inputs:
value: int
outputs:
out1:
type: string
outputSource: step2/out1
steps:
step2:
run: conditionals/cond-wf-003_nojs.cwl
in:
val: value
test:
valueFrom: "$(true)"
out: [ out1 ]
scatter: value
in:
value: min_std_max_min
out: [out1]