From 7c529dd7cea8150025f40c2e19a9cf16202fa4c1 Mon Sep 17 00:00:00 2001 From: E Rasche Date: Thu, 19 Apr 2018 13:19:15 +0200 Subject: [PATCH 1/2] Change 'a when tag has not been defined for' level to debug We've discussed this for a while going back and forth over this. Ultimately it's probably not that useful for admins and it clutters the warnings. There is a way to configure logging in planemo based on the python module (https://github.com/galaxyproject/planemo/commit/1eaff26f7c2db1e6eff25b98abbad19e4dc2be56) and planemo lint will catch this anyway. --- lib/galaxy/tools/__init__.py | 6 +++--- lib/galaxy/tools/parameters/basic.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 8ab64328799..e750cdd0ec3 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1131,7 +1131,7 @@ class Tool(Dictifiable): test_param_input_source = input_source.parse_test_input_source() group.test_param = self.parse_param_elem(test_param_input_source, enctypes, context) if group.test_param.optional: - log.warning("Tool with id %s declares a conditional test parameter as optional, this is invalid and will be ignored." % self.id) + log.debug("Tool with id %s declares a conditional test parameter as optional, this is invalid and will be ignored." % self.id) group.test_param.optional = False possible_cases = list(group.test_param.legal_values) # store possible cases, undefined whens will have no inputs # Must refresh when test_param changes @@ -1145,8 +1145,8 @@ class Tool(Dictifiable): try: possible_cases.remove(case.value) except Exception: - log.warning("Tool %s: a when tag has been defined for '%s (%s) --> %s', but does not appear to be selectable." % - (self.id, group.name, group.test_param.name, case.value)) + log.debug("Tool %s: a when tag has been defined for '%s (%s) --> %s', but does not appear to be selectable." % + (self.id, group.name, group.test_param.name, case.value)) for unspecified_case in possible_cases: log.warning("Tool %s: a when tag has not been defined for '%s (%s) --> %s', assuming empty inputs." % (self.id, group.name, group.test_param.name, unspecified_case)) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index ad1b7164945..571cea480f1 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1574,7 +1574,7 @@ class BaseDataToolParameter(ToolParameter): if datatype is not None: formats.append(datatype) else: - log.warning("Datatype class not found for extension '%s', which is used in the 'format' attribute of parameter '%s'" % (extension, self.name)) + log.info("Datatype class not found for extension '%s', which is used in the 'format' attribute of parameter '%s'" % (extension, self.name)) self.formats = formats def _parse_options(self, input_source): From 4db9d945a8ac74e8f92f901d8d048efcbacb2730 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 9 Aug 2019 15:01:38 -0400 Subject: [PATCH 2/2] Continue to output datatype mismatch as warning We don't have a linter for this yet, this is fatal for tool runs and can be fixed by admins (define the datatype or uninstall the tool). --- lib/galaxy/tools/parameters/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index 571cea480f1..ad1b7164945 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1574,7 +1574,7 @@ class BaseDataToolParameter(ToolParameter): if datatype is not None: formats.append(datatype) else: - log.info("Datatype class not found for extension '%s', which is used in the 'format' attribute of parameter '%s'" % (extension, self.name)) + log.warning("Datatype class not found for extension '%s', which is used in the 'format' attribute of parameter '%s'" % (extension, self.name)) self.formats = formats def _parse_options(self, input_source):