From 510290feea4bb328566770b636f9f093d00e93b0 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 16 Aug 2016 10:34:57 -0400 Subject: [PATCH 1/6] Add example of regressed 16.04 behavior related to dbkey output actions. --- test/functional/tools/dbkey_output_action.xml | 24 +++++++++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + 2 files changed, 25 insertions(+) create mode 100644 test/functional/tools/dbkey_output_action.xml diff --git a/test/functional/tools/dbkey_output_action.xml b/test/functional/tools/dbkey_output_action.xml new file mode 100644 index 00000000000..89d00c09aff --- /dev/null +++ b/test/functional/tools/dbkey_output_action.xml @@ -0,0 +1,24 @@ + + echo foo > $mapped_reads + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index 669d28ed2fa..a5dfee0d12d 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -18,6 +18,7 @@ + From 88d02dba6e851f0f60758a575920f6e7b130e261 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 16 Aug 2016 12:55:56 -0400 Subject: [PATCH 2/6] Don't fill in a cheetah default if unavailable. ... in metadata hack from #961. --- lib/galaxy/tools/actions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/actions/__init__.py b/lib/galaxy/tools/actions/__init__.py index 5cfee0ff06b..845d86b3322 100644 --- a/lib/galaxy/tools/actions/__init__.py +++ b/lib/galaxy/tools/actions/__init__.py @@ -628,7 +628,7 @@ class DefaultToolAction( object ): """ if output.actions: for action in output.actions.actions: - if action.tag == "metadata": + if action.tag == "metadata" and action.default: metadata_new_value = fill_template( action.default, context=params ).split(",") dataset.metadata.__setattr__(str(action.name), metadata_new_value) From 0110d5a05a4b1b357a3f321471fce1b2d4960e67 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 16 Aug 2016 14:08:38 -0400 Subject: [PATCH 3/6] Add a test case to dbkey_output_action.xml. Per @nsoranzo's template and suggestion. --- test/functional/tools/dbkey_output_action.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/functional/tools/dbkey_output_action.xml b/test/functional/tools/dbkey_output_action.xml index 89d00c09aff..9d100105ec5 100644 --- a/test/functional/tools/dbkey_output_action.xml +++ b/test/functional/tools/dbkey_output_action.xml @@ -21,4 +21,16 @@ + + + + + + + + + + + + \ No newline at end of file From e06cf9a97802d4c6a2ab97d973a373675e68b751 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 16 Aug 2016 14:12:17 -0400 Subject: [PATCH 4/6] Add None check to fill_template... ... as requested by @nsoranzo. --- lib/galaxy/util/template.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/galaxy/util/template.py b/lib/galaxy/util/template.py index 8e50f8e34d9..ef62853a781 100644 --- a/lib/galaxy/util/template.py +++ b/lib/galaxy/util/template.py @@ -1,7 +1,16 @@ +"""Entry point for the usage of Cheetah templating within Galaxy.""" from Cheetah.Template import Template def fill_template( template_text, context=None, **kwargs ): + """Fill a cheetah template out for specified context. + + If template_text is None, an exception will be thrown, if context + is None (the default) - keyword arguments to this function will be used + as the context. + """ + if template_text is None: + raise TypeError("Template text specified as None to fill_template.") if not context: context = kwargs return str( Template( source=template_text, searchList=[context] ) ) From 1f69bf32e8cf3c073804d2cdbb3823e14f1a8ce5 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Thu, 18 Aug 2016 14:03:59 +0100 Subject: [PATCH 5/6] Fix run.sh --daemon Broken in commit d5c52cadfd0007338d4c89f505ff272e9acae9f9 . Partial backport from #2765 . Close #2724. --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 901d7e46172..bd81956684f 100755 --- a/run.sh +++ b/run.sh @@ -34,7 +34,7 @@ do shift ;; --daemon|--restart|restart) - if [ "$1"=="--restart" ] + if [ "$1" == "--restart" ] then paster_args="$paster_args restart" else From a134587c893f6afa6f8bab1e9df7ff4ef74fa29c Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Fri, 8 Apr 2016 14:42:20 -0400 Subject: [PATCH 6/6] Correctly check set_environment declarations when updating repository. --- lib/tool_shed/util/shed_util_common.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/tool_shed/util/shed_util_common.py b/lib/tool_shed/util/shed_util_common.py index 51467fc6ed0..cc70003a177 100644 --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -98,7 +98,7 @@ def can_eliminate_repository_dependency(metadata_dict, tool_shed_url, name, owne return True -def can_eliminate_tool_dependency(metadata_dict, name, type, version): +def can_eliminate_tool_dependency(metadata_dict, name, dependency_type, version): """ Determine if the relationship between a tool_dependency record associated with a tool_shed_repository record on the Galaxy side @@ -106,12 +106,20 @@ def can_eliminate_tool_dependency(metadata_dict, name, type, version): """ td_dict = metadata_dict.get('tool_dependencies', {}) for td_key, td_val in td_dict.items(): - n = td_val.get('name', None) - t = td_val.get('type', None) - v = td_val.get('version', None) - if n == name and t == type and v == version: - # The tool dependency is current, so keep it. - return False + if td_key == 'set_environment': + for td in td_val: + n = td.get('name', None) + t = td.get('type', None) + if n == name and t == dependency_type: + # The tool dependency is current, so keep it. + return False + else: + n = td_val.get('name', None) + t = td_val.get('type', None) + v = td_val.get('version', None) + if n == name and t == dependency_type and v == version: + # The tool dependency is current, so keep it. + return False return True