Skip to content

Commit c967926

Browse files
committed
Merge branch 'release_24.0' into release_24.1
2 parents c4605da + e61a74b commit c967926

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

lib/galaxy/tool_util/xsd/galaxy.xsd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ A generalisation for macro tokens, templates and xml macros, i.e.
364364
`<macro name="a_template" type="template">` is identical to `<template name="a_template">`, and
365365
`<macro name="a_token" type="xml">` is identical to `<token name="a_token">`.
366366
367-
Note that
367+
Note that
368368
]]></xs:documentation>
369369
</xs:annotation>
370370
</xs:element>
@@ -6052,7 +6052,7 @@ Therefore a filter for such a variable looks like the following example.
60526052
<xs:documentation xml:lang="en"><![CDATA[
60536053
A string `[reverse_][SORT_COMP_]SORTBY` describing the desired sort order of the collection elements.
60546054
`SORTBY` can be `filename`, `name`, `designation`, `dbkey` and the optional `SORT_COMP` can be either
6055-
`lexical` or `numeric`. Default is lexical sorting by filename.
6055+
`lexical` or `numeric`. Default is lexical sorting by filename.
60566056
Note that lexical sorting is case sensitive, i.e. upper case characters come before lower case characters (e.g. "Apple" < "Banana" < "apple" < "banana").
60576057
]]></xs:documentation>
60586058
</xs:annotation>
@@ -6813,8 +6813,10 @@ paths for data or collection inputs set the ``data_style`` attribute to ``paths`
68136813
To include a dictionary with element identifiers, datatypes, staging paths, paths and metadata files set the ``data_style`` attribute to ``staging_path_and_source_path`` (element identifiers and datatypes are available since 24.0).
68146814
An example tool that uses ``staging_path_and_source_path`` is [inputs_as_json_with_staging_path_and_source_path.xml](https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/inputs_as_json_with_staging_path_and_source_path.xml)
68156815
6816-
Note that the element identifiers are stored as lists, where the last element is the actual element identifier of the dataset
6817-
and the other elements the identifiers of the collections containing the dataset.
6816+
Note that the ``element_identifier`` field matches the type of input, which means for simple data inputs ``element_identifier`` is a string,
6817+
for multiple="true" data inputs ``element_identifier`` is a list of strings corresponding to the element identifiers of each dataset passed to the input.
6818+
For dataset collections the element identifier is a list of strings with as many items in the list as the nesting level of the collection (i.e. 1 for list, 2 for list:list, 3 for list:list:list etc),
6819+
where the first item represents the outermost element identifier and the innermost item represents the innermost element identifier of the collection.
68186820
68196821
For tools with profile >= 20.05 a select with ``multiple="true"`` is rendered as an array which is empty if nothing is selected. For older profile versions select lists are rendered as comma separated strings or a literal ``null`` in case nothing is selected.
68206822
]]></xs:documentation>

lib/galaxy/tools/parameters/wrapped_json.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ def data_input_to_staging_path_and_source_path(
7878
v: "DatasetFilenameWrapper", invalid_chars: Sequence[str] = ("/",)
7979
) -> Dict[str, Any]:
8080
staging_path = v.get_staging_path(invalid_chars=invalid_chars)
81-
# note that the element identifier should be always a list
8281
return {
83-
"element_identifier": [v.element_identifier],
82+
"element_identifier": v.element_identifier,
8483
"ext": v.file_ext,
8584
"staging_path": staging_path,
8685
"source_path": data_input_to_path(v),

test/functional/tools/inputs_as_json_with_staging_path_and_source_path.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ input_json_path = sys.argv[1]
1212
as_dict = json.load(open(input_json_path, "r"))
1313
1414
data_input_with_staging_details = as_dict["data_input"]
15-
assert data_input_with_staging_details['element_identifier'] == ["1.tabular"]
15+
assert data_input_with_staging_details['element_identifier'] == "1.tabular"
1616
assert data_input_with_staging_details['ext'] == "tabular"
1717
assert data_input_with_staging_details['staging_path'] == "1.tabular.tabular"
1818
assert len(data_input_with_staging_details['metadata_files']) == 0
1919
2020
multiple_data_input_with_staging_details = as_dict["multiple_data_input"]
2121
assert len(multiple_data_input_with_staging_details) == 2
22-
assert multiple_data_input_with_staging_details[0]['element_identifier'] == ["simple_line.txt"]
22+
assert multiple_data_input_with_staging_details[0]['element_identifier'] == "simple_line.txt"
2323
assert multiple_data_input_with_staging_details[0]['ext'] == "txt"
2424
assert multiple_data_input_with_staging_details[0]['staging_path'] == "simple_line.txt.txt"
2525
assert len(multiple_data_input_with_staging_details[0]['metadata_files']) == 0

0 commit comments

Comments
 (0)