[hg] galaxy 2413: More fixes for DrilLDownParameter. Make Select...
details: http://www.bx.psu.edu/hg/galaxy/rev/a54fd974365d changeset: 2413:a54fd974365d user: Dan Blankenberg <dan@bx.psu.edu> date: Thu May 21 10:17:56 2009 -0400 description: More fixes for DrilLDownParameter. Make SelectToolParameterWrapper context aware. 3 file(s) affected in this change: lib/galaxy/tools/__init__.py lib/galaxy/tools/actions/__init__.py lib/galaxy/tools/parameters/basic.py diffs (55 lines): diff -r b818e6dff427 -r a54fd974365d lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py Thu May 21 09:40:21 2009 -0400 +++ b/lib/galaxy/tools/__init__.py Thu May 21 10:17:56 2009 -0400 @@ -1168,7 +1168,7 @@ tool = self, name = input.name ) elif isinstance( input, SelectToolParameter ): - input_values[ input.name ] = SelectToolParameterWrapper( input, input_values[ input.name ], self.app ) + input_values[ input.name ] = SelectToolParameterWrapper( input, input_values[ input.name ], self.app, other_values = param_dict ) else: input_values[ input.name ] = InputValueWrapper( input, input_values[ input.name ], param_dict ) # HACK: only wrap if check_values is not false, this deals with external @@ -1515,12 +1515,13 @@ Wraps a SelectTooParameter so that __str__ returns the selected value, but all other attributes are accessible. """ - def __init__( self, input, value, app ): + def __init__( self, input, value, app, other_values={} ): self.input = input self.value = value self.input.value_label = input.value_to_display_text( value, app ) + self._other_values = other_values def __str__( self ): - return self.input.to_param_dict_string( self.value ) + return self.input.to_param_dict_string( self.value, other_values = self._other_values ) def __getattr__( self, key ): return getattr( self.input, key ) diff -r b818e6dff427 -r a54fd974365d lib/galaxy/tools/actions/__init__.py --- a/lib/galaxy/tools/actions/__init__.py Thu May 21 09:40:21 2009 -0400 +++ b/lib/galaxy/tools/actions/__init__.py Thu May 21 10:17:56 2009 -0400 @@ -101,7 +101,7 @@ tool = tool, name = input.name ) elif isinstance( input, SelectToolParameter ): - input_values[ input.name ] = galaxy.tools.SelectToolParameterWrapper( input, input_values[ input.name ], tool.app ) + input_values[ input.name ] = galaxy.tools.SelectToolParameterWrapper( input, input_values[ input.name ], tool.app, other_values = incoming ) else: input_values[ input.name ] = galaxy.tools.InputValueWrapper( input, input_values[ input.name ], incoming ) out_data = {} diff -r b818e6dff427 -r a54fd974365d lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py Thu May 21 09:40:21 2009 -0400 +++ b/lib/galaxy/tools/parameters/basic.py Thu May 21 10:17:56 2009 -0400 @@ -1028,7 +1028,10 @@ # are not dynamic if self.is_dynamic: if value: - rval = [ value ] + if isinstance( value, list ): + rval = value + else: + rval = [ value ] else: rval = [] else:
participants (1)
-
Nate Coraor