Skip to content

Commit 35dc6c5

Browse files
author
Luka Stojanovic
committed
spec clarification and tests for empty scatter
1 parent fefed51 commit 35dc6c5

8 files changed

+81
-0
lines changed

v1.0/Workflow.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ $graph:
345345
All output parameter types are also implicitly wrapped in arrays. Each job
346346
in the scatter results in an entry in the output array.
347347
348+
If a scattered input is an empty list, step can be skipped, and all of it's
349+
outputs set to an empty list(s), according to applicable scattering rules.
350+
348351
If `scatter` declares more than one input parameter, `scatterMethod`
349352
describes how to decompose the input into a discrete set of jobs.
350353

v1.0/conformance_test_v1.0.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,36 @@
256256
tool: "v1.0/scatter-wf4.cwl#main"
257257
doc: Test workflow scatter with two scatter parameters and dotproduct join method
258258

259+
- job: v1.0/scatter-empty-job1.json
260+
output:
261+
out: []
262+
tool: v1.0/scatter-wf1.cwl
263+
doc: Test workflow scatter with single empty list parameter
264+
265+
- job: v1.0/scatter-empty-job2.json
266+
output:
267+
out: [[], []]
268+
tool: v1.0/scatter-wf2.cwl
269+
doc: Test workflow scatter with two scatter parameters and nested_crossproduct join method with second list empty
270+
271+
- job: v1.0/scatter-empty-job3.json
272+
output:
273+
out: []
274+
tool: "v1.0/scatter-wf3.cwl#main"
275+
doc: Test workflow scatter with two scatter parameters and nested_crossproduct join method with first list empty
276+
277+
- job: v1.0/scatter-empty-job2.json
278+
output:
279+
out: []
280+
tool: "v1.0/scatter-wf3.cwl#main"
281+
doc: Test workflow scatter with two scatter parameters, one of which is empty and flat_crossproduct join method
282+
283+
- job: v1.0/scatter-empty-job4.json
284+
output:
285+
out: []
286+
tool: "v1.0/scatter-wf4.cwl#main"
287+
doc: Test workflow scatter with two empty scatter parameters and dotproduct join method
288+
259289
- tool: v1.0/echo-tool.cwl
260290
job: v1.0/env-job.json
261291
output:

v1.1.0-dev1/Workflow.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ $graph:
352352
All output parameter types are also implicitly wrapped in arrays. Each job
353353
in the scatter results in an entry in the output array.
354354
355+
If a scattered input is an empty list, step can be skipped, and all of it's
356+
outputs set to an empty list(s), according to applicable scattering rules.
357+
355358
If `scatter` declares more than one input parameter, `scatterMethod`
356359
describes how to decompose the input into a discrete set of jobs.
357360

v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,36 @@
267267
tool: "v1.1.0-dev1/scatter-wf4.cwl#main"
268268
doc: Test workflow scatter with two scatter parameters and dotproduct join method
269269

270+
- job: v1.0/scatter-empty-job1.json
271+
output:
272+
out: []
273+
tool: v1.0/scatter-wf1.cwl
274+
doc: Test workflow scatter with single empty list parameter
275+
276+
- job: v1.0/scatter-empty-job2.json
277+
output:
278+
out: [[], []]
279+
tool: v1.0/scatter-wf2.cwl
280+
doc: Test workflow scatter with two scatter parameters and nested_crossproduct join method with second list empty
281+
282+
- job: v1.0/scatter-empty-job3.json
283+
output:
284+
out: []
285+
tool: "v1.0/scatter-wf3.cwl#main"
286+
doc: Test workflow scatter with two scatter parameters and nested_crossproduct join method with first list empty
287+
288+
- job: v1.0/scatter-empty-job2.json
289+
output:
290+
out: []
291+
tool: "v1.0/scatter-wf3.cwl#main"
292+
doc: Test workflow scatter with two scatter parameters, one of which is empty and flat_crossproduct join method
293+
294+
- job: v1.0/scatter-empty-job4.json
295+
output:
296+
out: []
297+
tool: "v1.0/scatter-wf4.cwl#main"
298+
doc: Test workflow scatter with two empty scatter parameters and dotproduct join method
299+
270300
- tool: v1.1.0-dev1/echo-tool.cwl
271301
job: v1.1.0-dev1/env-job.json
272302
output:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"inp": []
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inp1": ["one", "two"],
3+
"inp2": []
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inp1": [],
3+
"inp2": ["one", "two"]
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inp1": [],
3+
"inp2": []
4+
}

0 commit comments

Comments
 (0)