From c15573bfeed893889232da623fe1e484cd0c5740 Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Wed, 29 Apr 2015 14:59:42 -0400 Subject: [PATCH] Visualizations registry: remove 'show_deprecations until we get a better way to configure that, remove lambdas where builtins are available --- lib/galaxy/visualization/plugins/config_parser.py | 6 +----- lib/galaxy/visualization/plugins/resource_parser.py | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/visualization/plugins/config_parser.py b/lib/galaxy/visualization/plugins/config_parser.py index 2a9fea600f9..27d6f5239f5 100644 --- a/lib/galaxy/visualization/plugins/config_parser.py +++ b/lib/galaxy/visualization/plugins/config_parser.py @@ -25,9 +25,6 @@ class VisualizationsConfigParser( object ): -- what provides the data -- what information needs to be added to the query string """ - #: show/suppress info/warnings about deprecated elements and settings - show_deprecations = False - #: what are the allowed 'entry_point_type' for entry_point elements ALLOWED_ENTRY_POINT_TYPES = ['mako', 'html', 'script'] #: what are the allowed href targets when clicking on a visualization anchor @@ -161,8 +158,7 @@ class VisualizationsConfigParser( object ): # (older) mako-only syntax: the template to use in rendering the visualization template = xml_tree.find( 'template' ) if template is not None and template.text: - if self.show_deprecations: - log.info( 'template syntax is deprecated: use entry_point instead' ) + log.info( 'template syntax is deprecated: use entry_point instead' ) return { 'type' : 'mako', 'file' : template.text, diff --git a/lib/galaxy/visualization/plugins/resource_parser.py b/lib/galaxy/visualization/plugins/resource_parser.py index 7aeae75cffd..e2f81ae2e15 100644 --- a/lib/galaxy/visualization/plugins/resource_parser.py +++ b/lib/galaxy/visualization/plugins/resource_parser.py @@ -28,8 +28,8 @@ class ResourceParser( object ): primitive_parsers = { 'str' : lambda param: galaxy.util.sanitize_html.sanitize_html( param, 'utf-8' ), 'bool' : lambda param: galaxy.util.string_as_bool( param ), - 'int' : lambda param: int( param ), - 'float' : lambda param: float( param ), + 'int' : int, + 'float' : float, # 'date' : lambda param: , 'json' : ( lambda param: galaxy.util.json.loads( galaxy.util.sanitize_html.sanitize_html( param ) ) ),