Skip to content

Commit 6afeba3

Browse files
tetronmr-c
authored andcommitted
Fields with type "Expression" no longer required to include "string" in the type (#55)
Where a bare string is not semantically valid, these fields must contain either a non-string value accepted by the field type, or a valid expression which returns a value having one of the the other types defined for that field.
1 parent fb540b5 commit 6afeba3

File tree

4 files changed

+30
-25
lines changed

4 files changed

+30
-25
lines changed

CommandLineTool.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ $graph:
5757
* When defining record types with `CommandInputRecordSchema`, fields of
5858
type `File` may now include `format`, `loadContents`,
5959
`secondaryFiles` and `streamable`.
60-
* `CommandInputRecordSchema`, `CommandOutputRecordSchema`,
61-
`CommandInputEnumSchema and `CommandInputArraySchema` now have an optional
60+
* `CommandInputRecordSchema`, `CommandOutputRecordSchema`,
61+
`CommandInputEnumSchema and `CommandInputArraySchema` now have an optional
6262
`doc` field.
6363
* `inputBinding` has been added as an optional field for
6464
`CommandInputRecordSchema` (was previously in CWL `draft-3` but
@@ -114,6 +114,12 @@ $graph:
114114
* [Made explicit](#Generic_execution_process) that the `$namespaces` of
115115
the top level CWL document are also available to the input object as
116116
well.
117+
* Fields with type "Expression" no longer include "string" in
118+
the type union unless a string is semantically valid. Where
119+
a bare string is not semantically valid, these fields must
120+
contain either a non-string value accepted by the field
121+
type, or a valid expression which returns a value having one
122+
of the the other types defined for that field.
117123
118124
See also the [CWL Workflow Description, v1.1.0-dev1 changelog](Workflow.html#Changelog).
119125
@@ -211,7 +217,7 @@ $graph:
211217
212218
fields:
213219
- name: position
214-
type: [ int, Expression, string, "null" ]
220+
type: [ "null", int, Expression ]
215221
doc: |
216222
The sorting key. Default position is 0. If the inputBinding is
217223
associated with an input parameter, then the value of `self` in the
@@ -331,10 +337,7 @@ $graph:
331337
container filesystem except for declared input and output.
332338
333339
- name: outputEval
334-
type:
335-
- "null"
336-
- string
337-
- Expression
340+
type: Expression?
338341
doc: |
339342
Evaluate an expression to generate the output value. If
340343
`glob` was specified, the value of `self` must be an array
@@ -990,9 +993,7 @@ $graph:
990993
- Directory
991994
- Directory
992995
- Dirent
993-
- string
994996
- Expression
995-
- string
996997
- Expression
997998
jsonldPredicate:
998999
_id: "cwl:listing"
@@ -1085,35 +1086,35 @@ $graph:
10851086
"_id": "@type"
10861087
"_type": "@vocab"
10871088
- name: coresMin
1088-
type: ["null", long, string, Expression]
1089+
type: ["null", long, Expression]
10891090
doc: Minimum reserved number of CPU cores (default is 1)
10901091

10911092
- name: coresMax
1092-
type: ["null", int, string, Expression]
1093+
type: ["null", int, Expression]
10931094
doc: Maximum reserved number of CPU cores
10941095

10951096
- name: ramMin
1096-
type: ["null", long, string, Expression]
1097+
type: ["null", long, Expression]
10971098
doc: Minimum reserved RAM in mebibytes (2**20) (default is 256)
10981099

10991100
- name: ramMax
1100-
type: ["null", long, string, Expression]
1101+
type: ["null", long, Expression]
11011102
doc: Maximum reserved RAM in mebibytes (2**20)
11021103

11031104
- name: tmpdirMin
1104-
type: ["null", long, string, Expression]
1105+
type: ["null", long, Expression]
11051106
doc: Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024)
11061107

11071108
- name: tmpdirMax
1108-
type: ["null", long, string, Expression]
1109+
type: ["null", long, Expression]
11091110
doc: Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20)
11101111

11111112
- name: outdirMin
1112-
type: ["null", long, string, Expression]
1113+
type: ["null", long, Expression]
11131114
doc: Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024)
11141115

11151116
- name: outdirMax
1116-
type: ["null", long, string, Expression]
1117+
type: ["null", long, Expression]
11171118
doc: Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20)
11181119

11191120

@@ -1138,7 +1139,7 @@ $graph:
11381139
"_id": "@type"
11391140
"_type": "@vocab"
11401141
- name: enableReuse
1141-
type: [boolean, string, Expression]
1142+
type: [boolean, Expression]
11421143
default: true
11431144

11441145

@@ -1170,7 +1171,7 @@ $graph:
11701171
"_id": "@type"
11711172
"_type": "@vocab"
11721173
- name: networkAccess
1173-
type: [boolean, string, Expression]
1174+
type: [boolean, Expression]
11741175

11751176
- name: InplaceUpdateRequirement
11761177
type: record
@@ -1236,7 +1237,7 @@ $graph:
12361237
"_id": "@type"
12371238
"_type": "@vocab"
12381239
- name: timelimit
1239-
type: [long, string, Expression]
1240+
type: [long, Expression]
12401241
doc: |
12411242
The time limit, in seconds. A time limit of zero means no
12421243
time limit. Negative time limits are an error.

Process.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ $graph:
932932
extensions, the path is unchanged.
933933
3. Append the remainder of the string to the end of the file path.
934934
- name: required
935-
type: ["null", boolean, string, Expression]
935+
type: ["null", boolean, Expression]
936936
doc: |
937937
An implementation must not fail workflow execution if `required` is
938938
set to `false` and the expected secondary file does not exist.

Workflow.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $graph:
4949
5050
## Changelog
5151
52-
* Clarify intent of ExpressionTool and clarify that they can be run standalone.
52+
* Clarify intent of ExpressionTool and clarify that they can be run standalone.
5353
* Clarify how Requirements are inherited by step processes.
5454
* Clarify behavior around step inputs not consumed by the target
5555
run process.
@@ -97,6 +97,12 @@ $graph:
9797
* [Made explicit](#Generic_execution_process) that the `$namespaces` of
9898
the top level CWL document are also available to the input object as
9999
well.
100+
* Fields with type "Expression" no longer include "string" in
101+
the type union unless a string is semantically valid. Where
102+
a bare string is not semantically valid, these fields must
103+
contain either a non-string value accepted by the field
104+
type, or a valid expression which returns a value having one
105+
of the the other types defined for that field.
100106
101107
See also the [CWL Command Line Tool Description, v1.1.0-dev1 changelog](CommandLineTool.html#Changelog).
102108
@@ -198,7 +204,7 @@ $graph:
198204
"_type": "@vocab"
199205
type: string
200206
- name: expression
201-
type: [string, Expression]
207+
type: Expression
202208
doc: |
203209
The expression to execute. The expression must return a JSON object which
204210
matches the output parameters of the ExpressionTool.

tests/count-lines14-wf.cwl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ steps:
2323
in: {file1: file1}
2424
out: [count_output]
2525
scatter: file1
26-
in:
27-
file1: [file1, file2]
2826
run:
2927
class: Workflow
3028
inputs:

0 commit comments

Comments
 (0)