mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Provide UI collection output information for subworkflows.
This fixes #5158 and should provide more correct extension based connection information as well. Includes a backport of #4346 which fixes #3120.
This commit is contained in:
@@ -294,13 +294,29 @@ class SubWorkflowModule( WorkflowModule ):
|
||||
for workflow_output in self.subworkflow.workflow_outputs:
|
||||
output_step = workflow_output.workflow_step
|
||||
label = workflow_output.label
|
||||
if label is None:
|
||||
label = "%s:%s" % (output_step.order_index, workflow_output.output_name)
|
||||
target_output_name = workflow_output.output_name
|
||||
if not label:
|
||||
label = "%s:%s" % (output_step.order_index, target_output_name)
|
||||
output_module = module_factory.from_workflow_step(self.trans, output_step)
|
||||
data_outputs = output_module.get_data_outputs()
|
||||
target_output = {}
|
||||
for data_output in data_outputs:
|
||||
if data_output["name"] == target_output_name:
|
||||
target_output = data_output
|
||||
output = dict(
|
||||
name=label,
|
||||
label=label,
|
||||
extensions=['input'], # TODO
|
||||
extensions=target_output.get('extensions', ['input']),
|
||||
)
|
||||
if target_output.get("collection"):
|
||||
output["collection"] = True
|
||||
output["collection_type"] = target_output["collection_type"]
|
||||
# TODO: collection_type_source should be set here to be more percise/correct -
|
||||
# but it can't be passed through as is since it would reference something
|
||||
# the editor can't see. Since we fix input collection types to workflows
|
||||
# the more correct thing to do would be to walk the subworkflow and
|
||||
# determine the effective collection type if collection_type_source
|
||||
# is set.
|
||||
outputs.append(output)
|
||||
return outputs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user