Skip to content

Commit 48475cd

Browse files
committed
More defaults (#68)
* some defaults should not be set using 'default' To implement the slightly complicated default value rules for ResourceRequirement * InputBinding.position default is 0. * File.streamable default is false.
1 parent 74b3ff4 commit 48475cd

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

CommandLineTool.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,12 @@ $graph:
180180
fields:
181181
- name: position
182182
type: [ "null", int, Expression ]
183+
default: 0
183184
doc: |
184-
The sorting key. Default position is 0. If the inputBinding is
185-
associated with an input parameter, then the value of `self` in the
186-
expression will be the value of the input parameter. Input parameter
185+
The sorting key. Default position is 0. If a [CWL Parameter Reference](#Parameter_references)
186+
or [CWL Expression](#Expressions_(Optional)) is used and if the
187+
inputBinding is associated with an input parameter, then the value of
188+
`self` will be the value of the input parameter. Input parameter
187189
defaults (as specified by the `InputParameter.default` field) must be
188190
applied before evaluating the expression. Expressions must return a
189191
single value of type int or a null.
@@ -1165,6 +1167,10 @@ $graph:
11651167
"_type": "@vocab"
11661168
- name: coresMin
11671169
type: ["null", long, float, Expression]
1170+
# default: 1
1171+
# Don't set the default here, we need to be able to distinguish between
1172+
# a value not provided and the textual default to be able to implement
1173+
# the rules written in the ResourceRequirement doc above
11681174
doc: |
11691175
Minimum reserved number of CPU cores (default is 1).
11701176
@@ -1201,6 +1207,12 @@ $graph:
12011207
12021208
- name: ramMin
12031209
type: ["null", long, float, Expression]
1210+
# default: 256
1211+
# Don't set the default here, we need to be able to distinguish between
1212+
# a value not provided and the textual default to be able to implement
1213+
# the rules written in the ResourceRequirement doc above.
1214+
# Consumers of ResourceRequirement must apply the default value algorithm
1215+
# themselves and not rely on schema-salad rules
12041216
doc: |
12051217
Minimum reserved RAM in mebibytes (2**20) (default is 256)
12061218
@@ -1219,6 +1231,12 @@ $graph:
12191231
12201232
- name: tmpdirMin
12211233
type: ["null", long, float, Expression]
1234+
# default: 1024
1235+
# Don't set the default here, we need to be able to distinguish between
1236+
# a value not provided and the textual default to be able to implement
1237+
# the rules written in the ResourceRequirement doc above
1238+
# Consumers of ResourceRequirement must apply the default value algorithm
1239+
# themselves and not rely on schema-salad rules
12221240
doc: |
12231241
Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024)
12241242
@@ -1237,6 +1255,12 @@ $graph:
12371255
12381256
- name: outdirMin
12391257
type: ["null", long, float, Expression]
1258+
# default: 1024
1259+
# Don't set the default here, we need to be able to distinguish between
1260+
# a value not provided and the textual default to be able to implement
1261+
# the rules written in the ResourceRequirement doc above
1262+
# Consumers of ResourceRequirement must apply the default value algorithm
1263+
# themselves and not rely on schema-salad rules
12401264
doc: |
12411265
Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024)
12421266

Process.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,7 @@ $graph:
558558
559559
streamable:
560560
type: boolean?
561+
default: false
561562
doc: |
562563
Only valid when `type: File` or is an array of `items: File`.
563564

0 commit comments

Comments
 (0)