From 3056fbbf12a925f557a029c426a3be4ec9dfe7b0 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 5 Mar 2019 10:27:43 +0100 Subject: [PATCH] Simple filter_output This obviously doesn't work (yet) with filters that work on the input dataset, but this already removes a lot of outputs that arent' going to be produced based on static options. Since exceptions default to priduing the dataset this isn't much harm. --- lib/galaxy/workflow/modules.py | 3 +++ test/unit/workflows/test_modules.py | 1 + 2 files changed, 4 insertions(+) diff --git a/lib/galaxy/workflow/modules.py b/lib/galaxy/workflow/modules.py index 9f4a21bf9ef..b28f2d7f7c6 100644 --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -23,6 +23,7 @@ from galaxy.tools import ( DefaultToolState, ToolInputsNotReadyException ) +from galaxy.tools.actions import filter_output from galaxy.tools.execute import execute, MappingParameters, PartialJobExecution from galaxy.tools.parameters import ( check_param, @@ -930,6 +931,8 @@ class ToolModule(WorkflowModule): data_outputs = [] if self.tool: for name, tool_output in self.tool.outputs.items(): + if filter_output(tool_output, self.state.inputs): + continue extra_kwds = {} if tool_output.collection: extra_kwds["collection"] = True diff --git a/test/unit/workflows/test_modules.py b/test/unit/workflows/test_modules.py index 64d479b50be..202c2e451a0 100644 --- a/test/unit/workflows/test_modules.py +++ b/test/unit/workflows/test_modules.py @@ -284,6 +284,7 @@ def __mock_tool( format='input', format_source=None, change_format=[], + filters=[], label=None)}, params_from_strings=mock.Mock(), check_and_update_param_values=mock.Mock(),