Skip to content

Commit d0420dd

Browse files
author
Peter Amstutz
committed
Merge branch 'StarvingMarvin-empty-scatter' into v1.0-errata
2 parents 0ad5a58 + f6a71a0 commit d0420dd

12 files changed

+96
-2
lines changed

v1.0/Workflow.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,9 @@ $graph:
369369
All output parameter types are also implicitly wrapped in arrays. Each job
370370
in the scatter results in an entry in the output array.
371371
372-
If any scattered parameter is empty at runtime, all outputs are set to
373-
empty arrays and no work is done for the step.
372+
If any scattered parameter runtime value is an empty array, all outputs are
373+
set to empty arrays and no work is done for the step, according to
374+
applicable scattering rules.
374375
375376
If `scatter` declares more than one input parameter, `scatterMethod`
376377
describes how to decompose the input into a discrete set of jobs.

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.0/v1.0/scatter-empty-job1.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"inp": []
3+
}

v1.0/v1.0/scatter-empty-job2.json

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+
}

v1.0/v1.0/scatter-empty-job3.json

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+
}

v1.0/v1.0/scatter-empty-job4.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"inp1": [],
3+
"inp2": []
4+
}

v1.1.0-dev1/Workflow.yml

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

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.1.0-dev1/scatter-empty-job1.json
271+
output:
272+
out: []
273+
tool: v1.1.0-dev1/scatter-wf1.cwl
274+
doc: Test workflow scatter with single empty list parameter
275+
276+
- job: v1.1.0-dev1/scatter-empty-job2.json
277+
output:
278+
out: [[], []]
279+
tool: v1.1.0-dev1/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.1.0-dev1/scatter-empty-job3.json
283+
output:
284+
out: []
285+
tool: "v1.1.0-dev1/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.1.0-dev1/scatter-empty-job2.json
289+
output:
290+
out: []
291+
tool: "v1.1.0-dev1/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.1.0-dev1/scatter-empty-job4.json
295+
output:
296+
out: []
297+
tool: "v1.1.0-dev1/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)