Skip to content

Commit 8798dc8

Browse files
author
Peter Amstutz
committed
Merge branch 'master' into directory
2 parents 2d7ca73 + 272aefa commit 8798dc8

10 files changed

+281
-38
lines changed

draft-4/CommandLineTool.yml

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,21 +368,95 @@ $graph:
368368
- specializeFrom: "#InputBinding"
369369
specializeTo: "#CommandLineBinding"
370370

371-
372371
- type: record
373372
name: CommandOutputParameter
374373
extends: "#OutputParameter"
375374
doc: An output parameter for a CommandLineTool.
376375
specialize:
377-
- specializeFrom: "#OutputRecordSchema"
378-
specializeTo: "#CommandOutputRecordSchema"
379-
- specializeFrom: "#OutputEnumSchema"
380-
specializeTo: "#CommandOutputEnumSchema"
381-
- specializeFrom: "#OutputArraySchema"
382-
specializeTo: "#CommandOutputArraySchema"
383376
- specializeFrom: "#OutputBinding"
384377
specializeTo: "#CommandOutputBinding"
378+
fields:
379+
- name: type
380+
type:
381+
- "null"
382+
- "#CWLType"
383+
- "#stdout"
384+
- "#stderr"
385+
- "#CommandOutputRecordSchema"
386+
- "#CommandOutputEnumSchema"
387+
- "#CommandOutputArraySchema"
388+
- string
389+
- type: array
390+
items:
391+
- "#CWLType"
392+
- "#CommandOutputRecordSchema"
393+
- "#CommandOutputEnumSchema"
394+
- "#CommandOutputArraySchema"
395+
- string
396+
jsonldPredicate:
397+
"_id": "sld:type"
398+
"_type": "@vocab"
399+
refScope: 2
400+
typeDSL: True
401+
doc: |
402+
Specify valid types of data that may be assigned to this parameter.
385403
404+
- name: stdout
405+
type: enum
406+
symbols: [ "cwl:stdout" ]
407+
docParent: "#CommandOutputParameter"
408+
doc: |
409+
Only valid as a `type` for a `CommandLineTool` output with no
410+
`outputBinding` set.
411+
412+
The following
413+
```
414+
outputs:
415+
an_output_name:
416+
type: stdout
417+
418+
stdout: a_stdout_file
419+
```
420+
is equivalent to
421+
```
422+
outputs:
423+
an_output_name:
424+
type: File
425+
outputBinding:
426+
glob: a_stdout_file
427+
428+
stdout: a_stdout_file
429+
```
430+
431+
If there is no `stdout` name provided, a random filename will be created.
432+
433+
434+
- name: stderr
435+
type: enum
436+
symbols: [ "cwl:stderr" ]
437+
docParent: "#CommandOutputParameter"
438+
doc: |
439+
Only valid as a `type` for a `CommandLineTool` output with no
440+
`outputBinding` set.
441+
442+
The following
443+
```
444+
outputs:
445+
an_output_name:
446+
type: stderr
447+
448+
stderr: a_stderr_file
449+
```
450+
is equivalent to
451+
```
452+
outputs:
453+
an_output_name:
454+
type: File
455+
outputBinding:
456+
glob: a_stderr_file
457+
```
458+
459+
If there is no `stderr` name provided, a random filename will be created.
386460
387461
- type: record
388462
name: CommandLineTool
@@ -436,6 +510,7 @@ $graph:
436510
standard input stream.
437511
- name: stderr
438512
type: ["null", string, "#Expression"]
513+
jsonldPredicate: "https://w3id.org/cwl/cwl#stderr"
439514
doc: |
440515
Capture the command's standard error stream to a file written to
441516
the designated output directory.
@@ -448,6 +523,7 @@ $graph:
448523
characters (such as the path separator `/`) it is an error.
449524
- name: stdout
450525
type: ["null", string, "#Expression"]
526+
jsonldPredicate: "https://w3id.org/cwl/cwl#stdout"
451527
doc: |
452528
Capture the command's standard output stream to a file written to
453529
the designated output directory.

draft-4/Process.yml

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ $graph:
230230
mapSubject: basename
231231
mapPredicate: entry
232232

233-
234233
- name: SchemaBase
235234
type: record
236235
abstract: true
@@ -301,29 +300,6 @@ $graph:
301300
Define an input or output parameter to a process.
302301
303302
fields:
304-
- name: type
305-
type:
306-
- "null"
307-
- "#CWLType"
308-
- "sld:RecordSchema"
309-
- "sld:EnumSchema"
310-
- "sld:ArraySchema"
311-
- string
312-
- type: array
313-
items:
314-
- "#CWLType"
315-
- "sld:RecordSchema"
316-
- "sld:EnumSchema"
317-
- "sld:ArraySchema"
318-
- string
319-
jsonldPredicate:
320-
"_id": "sld:type"
321-
"_type": "@vocab"
322-
refScope: 2
323-
typeDSL: True
324-
doc: |
325-
Specify valid types of data that may be assigned to this parameter.
326-
327303
- name: label
328304
type:
329305
- "null"
@@ -486,13 +462,6 @@ $graph:
486462
- name: InputParameter
487463
type: record
488464
extends: "#Parameter"
489-
specialize:
490-
- specializeFrom: "sld:RecordSchema"
491-
specializeTo: "#InputRecordSchema"
492-
- specializeFrom: "sld:EnumSchema"
493-
specializeTo: "#InputEnumSchema"
494-
- specializeFrom: "sld:ArraySchema"
495-
specializeTo: "#InputArraySchema"
496465
fields:
497466
- name: id
498467
type: string
@@ -513,6 +482,28 @@ $graph:
513482
The default value for this parameter if not provided in the input
514483
object.
515484
485+
- name: type
486+
type:
487+
- "null"
488+
- "#CWLType"
489+
- "#InputRecordSchema"
490+
- "#InputEnumSchema"
491+
- "#InputArraySchema"
492+
- string
493+
- type: array
494+
items:
495+
- "#CWLType"
496+
- "#InputRecordSchema"
497+
- "#InputEnumSchema"
498+
- "#InputArraySchema"
499+
- string
500+
jsonldPredicate:
501+
"_id": "sld:type"
502+
"_type": "@vocab"
503+
refScope: 2
504+
typeDSL: True
505+
doc: |
506+
Specify valid types of data that may be assigned to this parameter.
516507
517508
- name: OutputParameter
518509
type: record

draft-4/Workflow.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,39 @@ $graph:
5050
5151
- {$include: concepts.md}
5252

53+
- name: ExpressionToolOutputParameter
54+
type: record
55+
extends: Parameter
56+
fields:
57+
- name: type
58+
type:
59+
- "null"
60+
- "#CWLType"
61+
- "sld:RecordSchema"
62+
- "sld:EnumSchema"
63+
- "sld:ArraySchema"
64+
- string
65+
- type: array
66+
items:
67+
- "#CWLType"
68+
- "sld:RecordSchema"
69+
- "sld:EnumSchema"
70+
- "sld:ArraySchema"
71+
- string
72+
jsonldPredicate:
73+
"_id": "sld:type"
74+
"_type": "@vocab"
75+
refScope: 2
76+
typeDSL: True
77+
doc: |
78+
Specify valid types of data that may be assigned to this parameter.
5379
5480
- type: record
5581
name: ExpressionTool
5682
extends: Process
83+
specialize:
84+
- specializeFrom: "#OutputParameter"
85+
specializeTo: "#ExpressionToolOutputParameter"
5786
documentRoot: true
5887
doc: |
5988
Execute an expression as a process step.
@@ -104,6 +133,28 @@ $graph:
104133
doc: |
105134
The method to use to merge multiple sources into a single array.
106135
If not specified, the default method is "merge_nested".
136+
- name: type
137+
type:
138+
- "null"
139+
- "#CWLType"
140+
- "#OutputRecordSchema"
141+
- "#OutputEnumSchema"
142+
- "#OutputArraySchema"
143+
- string
144+
- type: array
145+
items:
146+
- "#CWLType"
147+
- "#OutputRecordSchema"
148+
- "#OutputEnumSchema"
149+
- "#OutputArraySchema"
150+
- string
151+
jsonldPredicate:
152+
"_id": "sld:type"
153+
"_type": "@vocab"
154+
refScope: 2
155+
typeDSL: True
156+
doc: |
157+
Specify valid types of data that may be assigned to this parameter.
107158
108159
109160
- name: Sink

draft-4/conformance_test_draft-4.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,43 @@
6363
tool: draft-4/cat3-tool.cwl
6464
doc: Test command execution in Docker with stdout redirection
6565

66+
- job: draft-4/cat-job.json
67+
tool: draft-4/cat3-tool-shortcut.cwl
68+
doc: Test command execution in Docker with stdout redirection
69+
70+
- job: draft-4/cat-job.json
71+
output:
72+
output_file:
73+
class: File
74+
checksum: sha1$47a013e660d408619d894b20806b1d5086aab03b
75+
path: cat-out
76+
size: 13
77+
tool: draft-4/cat3-tool-mediumcut.cwl
78+
doc: Test command execution in Docker with stdout redirection
79+
80+
- args: [egrep]
81+
stderr: error.txt
82+
job:
83+
tool: draft-4/egrep-stderr.cwl
84+
doc: Test command line with stderr redirection
85+
86+
- args: [egrep]
87+
job:
88+
tool: draft-4/egrep-stderr-shortcut.cwl
89+
doc: Test command line with stderr redirection, brief syntax
90+
91+
- args: [egrep]
92+
stderr: std.err
93+
output:
94+
output_file:
95+
class: File
96+
size: 84
97+
checksum: sha1$cec7b8746a78c42060c96505887449bca0142976
98+
path: std.err
99+
job:
100+
tool: draft-4/egrep-stderr-mediumcut.cwl
101+
doc: Test command line with stderr redirection, named brief syntax
102+
66103
- job: draft-4/cat-job.json
67104
output:
68105
output_txt:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: cwl:draft-4.dev2
4+
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
5+
hints:
6+
DockerRequirement:
7+
dockerPull: debian:wheezy
8+
inputs:
9+
file1:
10+
type: File
11+
label: Input File
12+
description: "The file that will be copied using 'cat'"
13+
inputBinding: {position: 1}
14+
outputs:
15+
output_file:
16+
type: stdout
17+
baseCommand: cat
18+
stdout: cat-out
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: cwl:draft-4.dev2
4+
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
5+
hints:
6+
DockerRequirement:
7+
dockerPull: debian:wheezy
8+
inputs:
9+
file1:
10+
type: File
11+
label: Input File
12+
description: "The file that will be copied using 'cat'"
13+
inputBinding: {position: 1}
14+
outputs:
15+
output_file:
16+
type: stdout
17+
baseCommand: cat
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: cwl:draft-4.dev2
4+
description: "Test of capturing stderr output in a docker container."
5+
hints:
6+
DockerRequirement:
7+
dockerPull: debian:wheezy
8+
9+
inputs: []
10+
11+
outputs:
12+
output_file:
13+
type: stderr
14+
15+
baseCommand: egrep
16+
successCodes: [2]
17+
18+
stderr: std.err
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: cwl:draft-4.dev2
4+
description: "Test of capturing stderr output in a docker container."
5+
hints:
6+
DockerRequirement:
7+
dockerPull: debian:wheezy
8+
9+
inputs: []
10+
11+
outputs:
12+
output_file:
13+
type: stderr
14+
15+
baseCommand: egrep
16+
successCodes: [2]

0 commit comments

Comments
 (0)