Loading lib/galaxy/tools/evaluation.py +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ class ToolEvaluator: element_identifier = element_identifier_mapper.identifier(dataset, param_dict) if element_identifier: wrapper_kwds["identifier"] = element_identifier wrapper_kwds["formats"] = input.formats input_values[input.name] = DatasetFilenameWrapper(dataset, **wrapper_kwds) elif isinstance(input, DataCollectionToolParameter): dataset_collection = value Loading lib/galaxy_test/api/test_workflows.py +25 −0 Original line number Diff line number Diff line Loading @@ -3828,6 +3828,31 @@ test_data: assert_ok=True, ) @skip_without_tool("implicit_conversion_format_input") def test_run_with_implicit_collection_map_over(self): with self.dataset_populator.test_history() as history_id: self._run_workflow( """ class: GalaxyWorkflow inputs: collection: collection steps: map_over: tool_id: implicit_conversion_format_input in: input1: collection test_data: collection: collection_type: list elements: - identifier: 1 value: 1.fasta.gz type: File """, history_id=history_id, assert_ok=True, ) @skip_without_tool("random_lines1") def test_change_datatype_collection_map_over(self): with self.dataset_populator.test_history() as history_id: Loading lib/galaxy_test/base/populators.py +12 −6 Original line number Diff line number Diff line Loading @@ -2857,6 +2857,8 @@ class BaseDatasetCollectionPopulator: history_id=history_id, targets=targets, ) if "__files" in kwds: payload["__files"] = kwds.pop("__files") return payload def wait_for_fetched_collection(self, fetch_response: Union[Dict[str, Any], Response]): Loading Loading @@ -2992,7 +2994,8 @@ def load_data_dict( if is_dict and ("elements" in value or value.get("collection_type")): elements_data = value.get("elements", []) elements = [] for element_data in elements_data: new_collection_kwds: Dict[str, Any] = {} for i, element_data in enumerate(elements_data): # Adapt differences between test_data dict and fetch API description. if "name" not in element_data: identifier = element_data.pop("identifier") Loading @@ -3000,14 +3003,17 @@ def load_data_dict( input_type = element_data.pop("type", "raw") content = None if input_type == "File": content = read_test_data(element_data) content = open_test_data(element_data) element_data["src"] = "files" if "__files" not in new_collection_kwds: new_collection_kwds["__files"] = {} new_collection_kwds["__files"][f"file_{i}|file_data"] = content else: content = element_data.pop("content") if content is not None: element_data["src"] = "pasted" element_data["paste_content"] = content elements.append(element_data) new_collection_kwds = {} if "name" in value: new_collection_kwds["name"] = value["name"] collection_type = value.get("collection_type", "") Loading Loading
lib/galaxy/tools/evaluation.py +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ class ToolEvaluator: element_identifier = element_identifier_mapper.identifier(dataset, param_dict) if element_identifier: wrapper_kwds["identifier"] = element_identifier wrapper_kwds["formats"] = input.formats input_values[input.name] = DatasetFilenameWrapper(dataset, **wrapper_kwds) elif isinstance(input, DataCollectionToolParameter): dataset_collection = value Loading
lib/galaxy_test/api/test_workflows.py +25 −0 Original line number Diff line number Diff line Loading @@ -3828,6 +3828,31 @@ test_data: assert_ok=True, ) @skip_without_tool("implicit_conversion_format_input") def test_run_with_implicit_collection_map_over(self): with self.dataset_populator.test_history() as history_id: self._run_workflow( """ class: GalaxyWorkflow inputs: collection: collection steps: map_over: tool_id: implicit_conversion_format_input in: input1: collection test_data: collection: collection_type: list elements: - identifier: 1 value: 1.fasta.gz type: File """, history_id=history_id, assert_ok=True, ) @skip_without_tool("random_lines1") def test_change_datatype_collection_map_over(self): with self.dataset_populator.test_history() as history_id: Loading
lib/galaxy_test/base/populators.py +12 −6 Original line number Diff line number Diff line Loading @@ -2857,6 +2857,8 @@ class BaseDatasetCollectionPopulator: history_id=history_id, targets=targets, ) if "__files" in kwds: payload["__files"] = kwds.pop("__files") return payload def wait_for_fetched_collection(self, fetch_response: Union[Dict[str, Any], Response]): Loading Loading @@ -2992,7 +2994,8 @@ def load_data_dict( if is_dict and ("elements" in value or value.get("collection_type")): elements_data = value.get("elements", []) elements = [] for element_data in elements_data: new_collection_kwds: Dict[str, Any] = {} for i, element_data in enumerate(elements_data): # Adapt differences between test_data dict and fetch API description. if "name" not in element_data: identifier = element_data.pop("identifier") Loading @@ -3000,14 +3003,17 @@ def load_data_dict( input_type = element_data.pop("type", "raw") content = None if input_type == "File": content = read_test_data(element_data) content = open_test_data(element_data) element_data["src"] = "files" if "__files" not in new_collection_kwds: new_collection_kwds["__files"] = {} new_collection_kwds["__files"][f"file_{i}|file_data"] = content else: content = element_data.pop("content") if content is not None: element_data["src"] = "pasted" element_data["paste_content"] = content elements.append(element_data) new_collection_kwds = {} if "name" in value: new_collection_kwds["name"] = value["name"] collection_type = value.get("collection_type", "") Loading