Skip to content

Commit 0ee5dad

Browse files
committed
Merge branch 'release_25.0' into release_25.1
2 parents 343b184 + 1b4c1ec commit 0ee5dad

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

lib/galaxy/config/sample/datatypes_conf.xml.sample

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@
140140
<datatype extension="data" type="galaxy.datatypes.data:Data" mimetype="application/octet-stream" max_optional_metadata_filesize="1048576"/>
141141
<datatype extension="gz" type="galaxy.datatypes.binary:Binary" subclass="true"/>
142142
<datatype extension="binary" type="galaxy.datatypes.binary:Binary" mimetype="application/octet-stream" max_optional_metadata_filesize="1048576"/>
143+
<datatype extension="las" type="galaxy.datatypes.binary:Binary" mimetype="application/vnd.las" subclass="true" display_in_upload="true" description="The LAS (LASer) format is a file format designed for the interchange and archiving of Lidar point cloud data." description_url="https://www.loc.gov/preservation/digital/formats/fdd/fdd000418.shtml">
144+
<infer_from suffix="las" />
145+
</datatype>
146+
<datatype extension="laz" type="galaxy.datatypes.binary:Binary" mimetype="application/vnd.las" subclass="true" display_in_upload="true" description="LAZ is an open format for lossless compression of LAS." description_url="https://downloads.rapidlasso.de/doc/laszip.pdf">
147+
<infer_from suffix="laz" />
148+
</datatype>
143149
<datatype extension="d3_hierarchy" type="galaxy.datatypes.text:Json" mimetype="application/json" subclass="true" display_in_upload="true"/>
144150
<datatype extension="cytoscapejson" type="galaxy.datatypes.text:CytoscapeJson" mimetype="application/json" display_in_upload="true" description="Cytoscape JSON format for network visualization, typically containing 'nodes' and 'edges' in a JSON object." description_url="https://js.cytoscape.org/#notation/elements-json" />
145151
<datatype extension="freq.json" type="galaxy.datatypes.text:Json" mimetype="application/json" subclass="true" display_in_upload="True" description="A JSON-formatted array of objects containing longitude, latitude, and frequency attributes."/>
@@ -627,6 +633,7 @@
627633
<datatype extension="iqtree" type="galaxy.datatypes.text:IQTree">
628634
<infer_from suffix="iqtree" />
629635
</datatype>
636+
<datatype extension="beast.trees" type="galaxy.datatypes.data:Text" subclass="true" display_in_upload="true" decription="A BEAST specific NEXUS text file containing posterior tree samples generated by BEAST MCMC analyses."/>
630637
<datatype extension="mldist" type="galaxy.datatypes.mothur:SquareDistanceMatrix"/>
631638
<!-- Start RGenetics Datatypes -->
632639
<datatype extension="affybatch" type="galaxy.datatypes.genetics:Affybatch" display_in_upload="true"/>

lib/galaxy/workflow/modules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,15 +2034,17 @@ def from_workflow_step(Class, trans, step, **kwds):
20342034

20352035
# ---- Saving in various forms ------------------------------------------
20362036

2037-
def save_to_step(self, step, detached=False):
2037+
def save_to_step(self, step: WorkflowStep, detached=False):
20382038
super().save_to_step(step, detached=detached)
20392039
step.tool_id = self.tool_id
20402040
if self.tool:
20412041
step.tool_version = self.get_version()
20422042
else:
20432043
step.tool_version = self.tool_version
20442044
if tool_uuid := getattr(self, "tool_uuid", None):
2045-
step.dynamic_tool = self.trans.app.dynamic_tool_manager.get_tool_by_uuid(tool_uuid)
2045+
tool = self.trans.app.toolbox.get_tool(tool_uuid=tool_uuid, user=self.trans.user)
2046+
if tool:
2047+
step.dynamic_tool_id = tool.dynamic_tool.id
20462048
if not detached:
20472049
for k, v in self.post_job_actions.items():
20482050
pja = self.__to_pja(k, v, step)

lib/galaxy_test/api/test_workflows.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
)
2626

2727
from galaxy.exceptions import error_codes
28+
from galaxy.tool_util_models import UserToolSource
2829
from galaxy.util import UNKNOWN
2930
from galaxy.util.unittest_utils import skip_if_github_down
31+
from galaxy_test.api.test_tools import TOOL_WITH_SHELL_COMMAND
3032
from galaxy_test.base import rules_test_data
3133
from galaxy_test.base.populators import (
3234
DatasetCollectionPopulator,
@@ -8336,6 +8338,33 @@ def test_cannot_run_workflow_on_immutable_history(self) -> None:
83368338
history_id=history_id,
83378339
)
83388340

8341+
def test_user_defined_workflow_update(self):
8342+
with self.dataset_populator.user_tool_execute_permissions():
8343+
unprivileged_tool = self.dataset_populator.create_unprivileged_tool(
8344+
UserToolSource(**TOOL_WITH_SHELL_COMMAND)
8345+
)
8346+
# Workflow doesn't matter, we're replacing it in the update
8347+
workflow = self.workflow_populator.load_workflow_from_resource("test_workflow_pause")
8348+
workflow_id = self.workflow_populator.create_workflow(workflow)
8349+
update_response = self._update_workflow(
8350+
workflow_id,
8351+
{
8352+
"steps": {
8353+
"0": {
8354+
"content_id": "cat_user_defined",
8355+
"id": 1,
8356+
"input_connections": {"datasets": []},
8357+
"name": "Concatenate Files",
8358+
"tool_uuid": unprivileged_tool["uuid"],
8359+
"type": "tool",
8360+
}
8361+
},
8362+
},
8363+
)
8364+
assert update_response.status_code == 200, update_response.text
8365+
workflow = self.workflow_populator.download_workflow(workflow_id)
8366+
assert workflow["steps"]["0"]["tool_representation"]["class"] == "GalaxyUserTool"
8367+
83398368
def _invoke_paused_workflow(self, history_id):
83408369
workflow = self.workflow_populator.load_workflow_from_resource("test_workflow_pause")
83418370
workflow_id = self.workflow_populator.create_workflow(workflow)

0 commit comments

Comments
 (0)