From b4020934793829f3735fa696de1fa3237391d945 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 23 Feb 2016 17:15:55 +0000 Subject: [PATCH] format_source in workflow editor is too restrictive. Case made well by @erasche on #1746, fixes #1746. To resolve this more correctly (and many other potential type problems) - the workflow editor should be significantly reworked to track the datatype (or a range of datatypes) on each terminal (the way it does for collection mapping information). The change would be a weeks worth of development effort and inappropriate to apply to a release branch. --- lib/galaxy/workflow/modules.py | 9 --------- test/functional/tools/output_format.xml | 6 +++--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/galaxy/workflow/modules.py b/lib/galaxy/workflow/modules.py index 7ae7aa45925..0ca2e170f44 100644 --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -983,7 +983,6 @@ class ToolModule( WorkflowModule ): def get_data_outputs( self ): data_outputs = [] - data_inputs = None for name, tool_output in self.tool.outputs.iteritems(): extra_kwds = {} if tool_output.collection: @@ -992,14 +991,6 @@ class ToolModule( WorkflowModule ): formats = [ 'input' ] # TODO: fix elif tool_output.format_source is not None: formats = [ 'input' ] # default to special name "input" which remove restrictions on connections - if data_inputs is None: - data_inputs = self.get_data_inputs() - # find the input parameter referenced by format_source - for di in data_inputs: - # input names come prefixed with conditional and repeat names separated by '|' - # remove prefixes when comparing with format_source - if di['name'] is not None and di['name'].split('|')[-1] == tool_output.format_source: - formats = di['extensions'] else: formats = [ tool_output.format ] for change_elem in tool_output.change_format: diff --git a/test/functional/tools/output_format.xml b/test/functional/tools/output_format.xml index 1b53cce7506..4f95a20f238 100644 --- a/test/functional/tools/output_format.xml +++ b/test/functional/tools/output_format.xml @@ -7,9 +7,9 @@ echo "test" > 5; - - - + + +