You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify input type aliases; move input_parameter_class out of generated file
Schema docs distinguish normalized gxformat2 spellings (data, collection,
string, int, float, boolean) from compatibility aliases (File, data_input,
data_collection, data_collection_input, text, integer). Updates GalaxyType,
WorkflowDataParameter, WorkflowIntegerParameter, WorkflowTextParameter, and
the optional/default field docs. Closes#200.
input_parameter_class and _INPUT_TYPE_TO_CLASS were hand-edited into the
generated gxformat2/schema/gxformat2.py in 1a2d9ed; any rerun of
build_schema.sh wiped them. Moved to gxformat2/schema/_input_parameter.py
(hand-written, regen-safe). Consumers in normalized/_format2.py and
normalized/_conversion.py updated.
Regenerated gxformat2/schema/v19_09.py, gxformat2.py, gxformat2_strict.py
to pick up the doc changes.
Copy file name to clipboardExpand all lines: gxformat2/schema/gxformat2_strict.py
+23-13Lines changed: 23 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -38,12 +38,15 @@ class PrimitiveType(str, Enum):
38
38
39
39
40
40
classGalaxyType(str, Enum):
41
-
"""Extends primitive types with the native Galaxy concepts such datasets and collections.
42
-
integer: an alias for int type - matches syntax used by Galaxy tools
43
-
text: an alias for string type - matches syntax used by Galaxy tools
44
-
File: an alias for data - there are subtle differences between a plain file, the CWL concept of 'File', and the Galaxy concept of a dataset - this may have subtly difference semantics in the future
45
-
data: a Galaxy dataset
46
-
collection: a Galaxy dataset collection"""
41
+
"""Extends primitive types with the native Galaxy concepts such as datasets and collections.
42
+
Normalized gxformat2 workflow input declaration spellings are ``data``, ``collection``, ``string``, ``int``, ``float``, and ``boolean``. Other spellings are accepted as compatibility aliases on import but normalized gxformat2 output emits the normalized spellings.
43
+
data: one Galaxy dataset input. Native Galaxy ``data_input`` converts to this spelling.
44
+
File: accepted alias for ``data``, but normalized gxformat2 output emits ``data``. Note: workflow **test job** YAML uses ``type: File`` to mean 'stage this file as test input data', which is a separate concept from workflow input declaration.
45
+
collection: one Galaxy dataset collection input. Native Galaxy ``data_collection_input`` converts to this spelling.
46
+
string: normalized gxformat2 spelling for native Galaxy text workflow parameters.
47
+
text: accepted alias for ``string`` because native Galaxy parameter state and Galaxy tool XML terminology use ``text``.
48
+
int: normalized gxformat2 spelling for native Galaxy integer workflow parameters.
49
+
integer: accepted alias for ``int`` because native Galaxy parameter state and Galaxy tool XML terminology use ``integer``."""
47
50
48
51
null="null"
49
52
boolean="boolean"
@@ -202,7 +205,7 @@ class BaseInputParameter(InputParameter, HasStepPosition):
202
205
id: None|str=Field(default=None, description="The unique identifier for this object.")
203
206
label: None|str=Field(default=None, description="A short, human-readable label of this object.")
204
207
doc: None|str|list[str] =Field(default=None, description="A documentation string for this object, or an array of strings which should be concatenated.")
205
-
optional: bool|None=Field(default=None, description="If set to true, `WorkflowInputParameter` is not required to submit the workflow.")
208
+
optional: bool|None=Field(default=None, description="Controls whether Galaxy allows invocation of the workflow without a user-supplied value for this input. If ``true``, the input may be omitted at invocation time. ``optional`` and ``default`` are in...")
@@ -224,7 +230,7 @@ class WorkflowDataParameter(BaseDataParameter):
224
230
doc: None|str|list[str] =Field(default=None, description="A documentation string for this object, or an array of strings which should be concatenated.")
225
231
default: None|Any=Field(default=None, description="The default value to use for this parameter if the parameter is missing from the input object, or if the value of the parameter in the input object is `null`. Default values are applied before eva...")
226
232
position: None|StepPosition=Field(default=None)
227
-
optional: bool|None=Field(default=None, description="If set to true, `WorkflowInputParameter` is not required to submit the workflow.")
233
+
optional: bool|None=Field(default=None, description="Controls whether Galaxy allows invocation of the workflow without a user-supplied value for this input. If ``true``, the input may be omitted at invocation time. ``optional`` and ``default`` are in...")
228
234
type_: Literal["data", "File"] |None=Field(default=None, alias="type", description="Specify valid types of data that may be assigned to this parameter.")
@@ -237,7 +243,7 @@ class WorkflowCollectionParameter(BaseDataParameter):
237
243
doc: None|str|list[str] =Field(default=None, description="A documentation string for this object, or an array of strings which should be concatenated.")
238
244
default: None|Any=Field(default=None, description="The default value to use for this parameter if the parameter is missing from the input object, or if the value of the parameter in the input object is `null`. Default values are applied before eva...")
239
245
position: None|StepPosition=Field(default=None)
240
-
optional: bool|None=Field(default=None, description="If set to true, `WorkflowInputParameter` is not required to submit the workflow.")
246
+
optional: bool|None=Field(default=None, description="Controls whether Galaxy allows invocation of the workflow without a user-supplied value for this input. If ``true``, the input may be omitted at invocation time. ``optional`` and ``default`` are in...")
241
247
type_: Literal["collection"] =Field(default="collection", alias="type", description="Must be ``collection``.")
242
248
collection_type: None|str=Field(default=None, description="Collection type (defaults to `list` if `type` is `collection`). Nested collection types are separated with colons, e.g. `list:list:paired`.")
243
249
@@ -248,7 +254,9 @@ class MinMax(BaseModel):
248
254
max: int|float|None=Field(default=None, description="Maximum allowed value (inclusive).")
@@ -307,7 +317,7 @@ class WorkflowInputParameter(BaseDataParameter, MinMax):
307
317
doc: None|str|list[str] =Field(default=None, description="A documentation string for this object, or an array of strings which should be concatenated.")
308
318
default: None|Any=Field(default=None, description="The default value to use for this parameter if the parameter is missing from the input object, or if the value of the parameter in the input object is `null`. Default values are applied before eva...")
309
319
position: None|StepPosition=Field(default=None)
310
-
optional: bool|None=Field(default=None, description="If set to true, `WorkflowInputParameter` is not required to submit the workflow.")
320
+
optional: bool|None=Field(default=None, description="Controls whether Galaxy allows invocation of the workflow without a user-supplied value for this input. If ``true``, the input may be omitted at invocation time. ``optional`` and ``default`` are in...")
311
321
type_: GalaxyType|None|list[GalaxyType] =Field(default=None, alias="type", description="Specify valid types of data that may be assigned to this parameter.")
312
322
collection_type: None|str=Field(default=None, description="Collection type (defaults to `list` if `type` is `collection`). Nested collection types are separated with colons, e.g. `list:list:paired`.")
Copy file name to clipboardExpand all lines: gxformat2/schema/v19_09.py
+19-9Lines changed: 19 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -3569,7 +3569,10 @@ def save(
3569
3569
3570
3570
class WorkflowDataParameter(BaseDataParameter):
3571
3571
"""
3572
-
A data input parameter for a Galaxy workflow - represents a dataset.
3572
+
A data input parameter for a Galaxy workflow. Represents one Galaxy dataset.
3573
+
Normalized gxformat2 output uses ``type: data``. ``type: File`` is accepted as
3574
+
an alias, but should not be confused with workflow test job syntax where
3575
+
``type: File`` means stage a file as test input data.
3573
3576
3574
3577
"""
3575
3578
@@ -4957,7 +4960,9 @@ def save(
4957
4960
4958
4961
class WorkflowIntegerParameter(BaseInputParameter, MinMax):
4959
4962
"""
4960
-
An integer input parameter for a Galaxy workflow.
4963
+
A scalar integer workflow parameter. Normalized gxformat2 output uses
4964
+
``type: int``. ``type: integer`` is accepted for compatibility with native
4965
+
Galaxy parameter state and Galaxy tool XML terminology.
4961
4966
4962
4967
"""
4963
4968
@@ -6191,7 +6196,9 @@ def save(
6191
6196
6192
6197
class WorkflowTextParameter(BaseInputParameter):
6193
6198
"""
6194
-
A text input parameter for a Galaxy workflow.
6199
+
A scalar text workflow parameter. Normalized gxformat2 output uses
6200
+
``type: string``. ``type: text`` is accepted for compatibility with native
6201
+
Galaxy parameter state and Galaxy tool XML terminology.
6195
6202
6196
6203
"""
6197
6204
@@ -15376,12 +15383,15 @@ def save(
15376
15383
"GalaxyType",
15377
15384
)
15378
15385
"""
15379
-
Extends primitive types with the native Galaxy concepts such datasets and collections.
15380
-
integer: an alias for int type - matches syntax used by Galaxy tools
15381
-
text: an alias for string type - matches syntax used by Galaxy tools
15382
-
File: an alias for data - there are subtle differences between a plain file, the CWL concept of 'File', and the Galaxy concept of a dataset - this may have subtly difference semantics in the future
15383
-
data: a Galaxy dataset
15384
-
collection: a Galaxy dataset collection
15386
+
Extends primitive types with the native Galaxy concepts such as datasets and collections.
15387
+
Normalized gxformat2 workflow input declaration spellings are ``data``, ``collection``, ``string``, ``int``, ``float``, and ``boolean``. Other spellings are accepted as compatibility aliases on import but normalized gxformat2 output emits the normalized spellings.
15388
+
data: one Galaxy dataset input. Native Galaxy ``data_input`` converts to this spelling.
15389
+
File: accepted alias for ``data``, but normalized gxformat2 output emits ``data``. Note: workflow **test job** YAML uses ``type: File`` to mean 'stage this file as test input data', which is a separate concept from workflow input declaration.
15390
+
collection: one Galaxy dataset collection input. Native Galaxy ``data_collection_input`` converts to this spelling.
15391
+
string: normalized gxformat2 spelling for native Galaxy text workflow parameters.
15392
+
text: accepted alias for ``string`` because native Galaxy parameter state and Galaxy tool XML terminology use ``text``.
15393
+
int: normalized gxformat2 spelling for native Galaxy integer workflow parameters.
15394
+
integer: accepted alias for ``int`` because native Galaxy parameter state and Galaxy tool XML terminology use ``integer``.
Copy file name to clipboardExpand all lines: schema/v19_09/workflow.yml
+26-10Lines changed: 26 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,15 @@ $graph:
37
37
- data
38
38
- collection
39
39
doc:
40
-
- "Extends primitive types with the native Galaxy concepts such datasets and collections."
41
-
- "integer: an alias for int type - matches syntax used by Galaxy tools"
42
-
- "text: an alias for string type - matches syntax used by Galaxy tools"
43
-
- "File: an alias for data - there are subtle differences between a plain file, the CWL concept of 'File', and the Galaxy concept of a dataset - this may have subtly difference semantics in the future"
44
-
- "data: a Galaxy dataset"
45
-
- "collection: a Galaxy dataset collection"
40
+
- "Extends primitive types with the native Galaxy concepts such as datasets and collections."
41
+
- "Normalized gxformat2 workflow input declaration spellings are ``data``, ``collection``, ``string``, ``int``, ``float``, and ``boolean``. Other spellings are accepted as compatibility aliases on import but normalized gxformat2 output emits the normalized spellings."
42
+
- "data: one Galaxy dataset input. Native Galaxy ``data_input`` converts to this spelling."
43
+
- "File: accepted alias for ``data``, but normalized gxformat2 output emits ``data``. Note: workflow **test job** YAML uses ``type: File`` to mean 'stage this file as test input data', which is a separate concept from workflow input declaration."
44
+
- "collection: one Galaxy dataset collection input. Native Galaxy ``data_collection_input`` converts to this spelling."
45
+
- "string: normalized gxformat2 spelling for native Galaxy text workflow parameters."
46
+
- "text: accepted alias for ``string`` because native Galaxy parameter state and Galaxy tool XML terminology use ``text``."
0 commit comments