Skip to content

Commit f6a71a0

Browse files
author
Peter Amstutz
committed
Merge branch 'empty-scatter' of https://github.com/StarvingMarvin/common-workflow-language into StarvingMarvin-empty-scatter
2 parents c50c150 + f4fe77f commit f6a71a0

12 files changed

+96
-0
lines changed

v1.0/Workflow.yml

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

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
@@ -355,6 +355,9 @@ $graph:
355355
All output parameter types are also implicitly wrapped in arrays. Each job
356356
in the scatter results in an entry in the output array.
357357
358+
If a scattered input is an empty list, step can be skipped, and all of it's
359+
outputs set to an empty list(s), according to applicable scattering rules.
360+
358361
If `scatter` declares more than one input parameter, `scatterMethod`
359362
describes how to decompose the input into a discrete set of jobs.
360363

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)