Skip to content

Commit c4cecad

Browse files
authored
Merge pull request #228 from common-workflow-language/scoped-ref-and-typedsl
Scoped ref and typedsl
2 parents d1d53b3 + 3e1b02c commit c4cecad

File tree

148 files changed

+4345
-998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+4345
-998
lines changed

draft-4/Process.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $graph:
1010
type: documentation
1111
doc: {$include: concepts.md}
1212

13-
- $import: "salad/schema_salad/metaschema/metaschema.yml"
13+
- $import: "salad/schema_salad/metaschema/metaschema_base.yml"
1414

1515
- name: BaseTypesDoc
1616
type: documentation
@@ -32,6 +32,7 @@ $graph:
3232
- cwl:draft-3.dev5
3333
- cwl:draft-3
3434
- cwl:draft-4.dev1
35+
- cwl:draft-4.dev2
3536

3637
- name: CWLType
3738
type: enum
@@ -226,6 +227,8 @@ $graph:
226227
jsonldPredicate:
227228
"_id": "sld:type"
228229
"_type": "@vocab"
230+
refScope: 2
231+
typeDSL: True
229232
doc: |
230233
Specify valid types of data that may be assigned to this parameter.
231234

draft-4/Workflow.yml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $graph:
5353

5454
- type: record
5555
name: ExpressionTool
56-
extends: "#Process"
56+
extends: Process
5757
documentRoot: true
5858
doc: |
5959
Execute an expression as a process step.
@@ -64,7 +64,7 @@ $graph:
6464
"_type": "@vocab"
6565
type: string
6666
- name: expression
67-
type: [string, "#Expression"]
67+
type: [string, Expression]
6868
doc: |
6969
The expression to execute. The expression must return a JSON object which
7070
matches the output parameters of the ExpressionTool.
@@ -80,12 +80,30 @@ $graph:
8080

8181
- name: WorkflowOutputParameter
8282
type: record
83-
extends: ["#OutputParameter", "#Sink"]
83+
extends: OutputParameter
8484
docParent: "#Workflow"
8585
doc: |
8686
Describe an output parameter of a workflow. The parameter must be
8787
connected to one or more parameters defined in the workflow that will
8888
provide the value of the output parameter.
89+
fields:
90+
- name: outputSource
91+
doc: |
92+
Specifies one or more workflow parameters that supply the value of to
93+
the output parameter.
94+
jsonldPredicate:
95+
"_id": "cwl:outputSource"
96+
"_type": "@id"
97+
refScope: 0
98+
type:
99+
- string?
100+
- string[]?
101+
- name: linkMerge
102+
type: ["null", "#LinkMergeMethod"]
103+
jsonldPredicate: "cwl:linkMerge"
104+
doc: |
105+
The method to use to merge multiple sources into a single array.
106+
If not specified, the default method is "merge_nested".
89107
90108
91109
- name: Sink
@@ -99,21 +117,21 @@ $graph:
99117
jsonldPredicate:
100118
"_id": "cwl:source"
101119
"_type": "@id"
120+
refScope: 2
102121
type:
103-
- "null"
104-
- string
105-
- type: array
106-
items: string
122+
- string?
123+
- string[]?
107124
- name: linkMerge
108-
type: ["null", "#LinkMergeMethod"]
125+
type: LinkMergeMethod?
126+
jsonldPredicate: "cwl:linkMerge"
109127
doc: |
110128
The method to use to merge multiple inbound links into a single array.
111129
If not specified, the default method is "merge_nested".
112130
113131
114132
- type: record
115133
name: WorkflowStepInput
116-
extends: "#Sink"
134+
extends: Sink
117135
docParent: "#WorkflowStep"
118136
doc: |
119137
The input of a workflow step connects an upstream parameter (from the
@@ -278,9 +296,7 @@ $graph:
278296
jsonldPredicate: "@id"
279297
doc: "The unique identifier for this workflow step."
280298
- name: in
281-
type:
282-
type: array
283-
items: "#WorkflowStepInput"
299+
type: WorkflowStepInput[]
284300
jsonldPredicate:
285301
_id: "cwl:in"
286302
mapSubject: id
@@ -294,7 +310,7 @@ $graph:
294310
- name: out
295311
type:
296312
- type: array
297-
items: [string, "#WorkflowStepOutput"]
313+
items: [string, WorkflowStepOutput]
298314
jsonldPredicate:
299315
_id: "cwl:out"
300316
_type: "@id"
@@ -303,10 +319,7 @@ $graph:
303319
Defines the parameters representing the output of the process. May be
304320
used to generate and/or validate the output object.
305321
- name: requirements
306-
type:
307-
- "null"
308-
- type: array
309-
items: "#ProcessRequirement"
322+
type: ProcessRequirement[]?
310323
jsonldPredicate:
311324
_id: "cwl:requirements"
312325
mapSubject: class
@@ -318,10 +331,7 @@ $graph:
318331
error and the implementation must not attempt to run the process,
319332
unless overridden at user option.
320333
- name: hints
321-
type:
322-
- "null"
323-
- type: array
324-
items: "Any"
334+
type: Any[]?
325335
jsonldPredicate:
326336
_id: "cwl:hints"
327337
noLinkCheck: true
@@ -332,40 +342,33 @@ $graph:
332342
not an error if an implementation cannot satisfy all hints, however
333343
the implementation may report a warning.
334344
- name: label
335-
type:
336-
- "null"
337-
- string
345+
type: string?
338346
jsonldPredicate: "rdfs:label"
339347
doc: "A short, human-readable label of this process object."
340348
- name: description
341-
type:
342-
- "null"
343-
- string
349+
type: string?
344350
jsonldPredicate: "rdfs:comment"
345351
doc: "A long, human-readable description of this process object."
346352
- name: run
347-
type: [string, "#Process"]
353+
type: [string, Process]
348354
jsonldPredicate:
349355
"_id": "cwl:run"
350356
"_type": "@id"
351357
doc: |
352358
Specifies the process to run.
353359
- name: scatter
354360
type:
355-
- "null"
356-
- string
357-
- type: array
358-
items: string
361+
- string?
362+
- string[]?
359363
jsonldPredicate:
360364
"_id": "cwl:scatter"
361365
"_type": "@id"
362366
"_container": "@list"
367+
refScope: 0
363368
- name: scatterMethod
364369
doc: |
365370
Required if `scatter` is an array of more than one element.
366-
type:
367-
- "null"
368-
- "#ScatterMethod"
371+
type: ScatterMethod?
369372
jsonldPredicate:
370373
"_id": "cwl:scatterMethod"
371374
"_type": "@vocab"
@@ -445,28 +448,28 @@ $graph:
445448

446449
- type: record
447450
name: SubworkflowFeatureRequirement
448-
extends: "#ProcessRequirement"
451+
extends: ProcessRequirement
449452
doc: |
450453
Indicates that the workflow platform must support nested workflows in
451454
the `run` field of (WorkflowStep)(#WorkflowStep).
452455
453456
- name: ScatterFeatureRequirement
454457
type: record
455-
extends: "#ProcessRequirement"
458+
extends: ProcessRequirement
456459
doc: |
457460
Indicates that the workflow platform must support the `scatter` and
458461
`scatterMethod` fields of [WorkflowStep](#WorkflowStep).
459462
460463
- name: MultipleInputFeatureRequirement
461464
type: record
462-
extends: "#ProcessRequirement"
465+
extends: ProcessRequirement
463466
doc: |
464467
Indicates that the workflow platform must support multiple inbound data links
465468
listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput).
466469
467470
- type: record
468471
name: StepInputExpressionRequirement
469-
extends: "#ProcessRequirement"
472+
extends: ProcessRequirement
470473
doc: |
471474
Indicate that the workflow platform must support the `valueFrom` field
472475
of [WorkflowStepInput](#WorkflowStepInput).

draft-4/draft-4/binding-test.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env cwl-runner
22

33
class: CommandLineTool
4-
cwlVersion: cwl:draft-4.dev1
4+
cwlVersion: cwl:draft-4.dev2
55

66
inputs:
77
reference:

draft-4/draft-4/bwa-mem-tool.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env cwl-runner
22

3-
cwlVersion: cwl:draft-4.dev1
3+
cwlVersion: cwl:draft-4.dev2
44

55
class: CommandLineTool
66

draft-4/draft-4/cat1-tool.cwl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env cwl-runner
2-
cwlVersion: cwl:draft-4.dev1
2+
cwlVersion: cwl:draft-4.dev2
33
class: CommandLineTool
44
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
55
hints:
@@ -10,7 +10,7 @@ inputs:
1010
type: File
1111
inputBinding: {position: 1}
1212
numbering:
13-
type: ["null", boolean]
13+
type: boolean?
1414
inputBinding:
1515
position: 0
1616
prefix: -n

draft-4/draft-4/cat2-tool.cwl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/usr/bin/env cwl-runner
22
class: CommandLineTool
3-
cwlVersion: cwl:draft-4.dev1
3+
cwlVersion: cwl:draft-4.dev2
44
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
55
hints:
66
DockerRequirement:
77
dockerPull: debian:wheezy
88
inputs:
9-
file1:
10-
type: File
9+
file1: File
1110
outputs: []
1211
baseCommand: cat
1312
stdin: $(inputs.file1.path)

draft-4/draft-4/cat3-tool.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env cwl-runner
22
class: CommandLineTool
3-
cwlVersion: cwl:draft-4.dev1
3+
cwlVersion: cwl:draft-4.dev2
44
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
55
hints:
66
DockerRequirement:

draft-4/draft-4/cat4-tool.cwl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/usr/bin/env cwl-runner
22
class: CommandLineTool
3-
cwlVersion: cwl:draft-4.dev1
3+
cwlVersion: cwl:draft-4.dev2
44
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
55
hints:
66
DockerRequirement:
77
dockerPull: debian:wheezy
88
inputs:
9-
file1:
10-
type: File
9+
file1: File
1110
outputs:
1211
output_txt:
1312
type: File

draft-4/draft-4/cat5-tool.cwl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env cwl-runner
2-
cwlVersion: cwl:draft-4.dev1
2+
cwlVersion: cwl:draft-4.dev2
33
class: CommandLineTool
44
description: "Print the contents of a file to stdout using 'cat' running in a docker container."
55
hints:

draft-4/draft-4/conflict-wf.cwl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cwlVersion: cwl:draft-4.dev1
1+
cwlVersion: cwl:draft-4.dev2
22
$graph:
33
- id: echo
44
class: CommandLineTool
@@ -41,35 +41,32 @@ $graph:
4141
id: collision
4242

4343
inputs:
44-
input_1:
45-
type: string
46-
47-
input_2:
48-
type: string
44+
input_1: string
45+
input_2: string
4946

5047
outputs:
5148
fileout:
5249
type: File
53-
source: "#collision/cat_step/fileout"
50+
outputSource: cat_step/fileout
5451

5552
steps:
5653
echo_1:
5754
run: "#echo"
5855
in:
59-
text: "#collision/input_1"
56+
text: input_1
6057
out: [fileout]
6158

6259
echo_2:
6360
run: "#echo"
6461
in:
65-
text: "#collision/input_2"
62+
text: input_2
6663
out: [fileout]
6764

6865
cat_step:
6966
run: "#cat"
7067
in:
7168
file1:
72-
source: "#collision/echo_1/fileout"
69+
source: echo_1/fileout
7370
file2:
74-
source: "#collision/echo_2/fileout"
71+
source: echo_2/fileout
7572
out: [fileout]

draft-4/draft-4/count-lines1-wf.cwl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env cwl-runner
22
class: Workflow
3-
cwlVersion: cwl:draft-4.dev1
3+
cwlVersion: cwl:draft-4.dev2
44

55
inputs:
66
file1:
@@ -9,17 +9,17 @@ inputs:
99
outputs:
1010
count_output:
1111
type: int
12-
source: "#step2/output"
12+
outputSource: step2/output
1313

1414
steps:
1515
step1:
1616
run: wc-tool.cwl
1717
in:
18-
file1: "#file1"
18+
file1: file1
1919
out: [output]
2020

2121
step2:
2222
run: parseInt-tool.cwl
2323
in:
24-
file1: "#step1/output"
24+
file1: step1/output
2525
out: [output]

0 commit comments

Comments
 (0)