1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/b453988dce62/ changeset: r5289:b453988dce62 user: dan date: 2011-03-31 16:16:40 summary: Fix for wrapping input values for change_format and label tags when tool is using check_values="false". Fixes issue seen when e.g. using an output label in a data_source tool. affected #: 1 file (309 bytes) --- a/lib/galaxy/tools/actions/__init__.py Wed Mar 30 17:20:10 2011 -0400 +++ b/lib/galaxy/tools/actions/__init__.py Thu Mar 31 10:16:40 2011 -0400 @@ -133,16 +133,18 @@ else: new_list.append( value ) return new_list - def wrap_values( inputs, input_values ): + def wrap_values( inputs, input_values, skip_missing_values = False ): # Wrap tool inputs as necessary for input in inputs.itervalues(): + if input.name not in input_values and skip_missing_values: + continue if isinstance( input, Repeat ): for d in input_values[ input.name ]: - wrap_values( input.inputs, d ) + wrap_values( input.inputs, d, skip_missing_values = skip_missing_values ) elif isinstance( input, Conditional ): values = input_values[ input.name ] current = values[ "__current_case__" ] - wrap_values( input.cases[current].inputs, values ) + wrap_values( input.cases[current].inputs, values, skip_missing_values = skip_missing_values ) elif isinstance( input, DataToolParameter ): input_values[ input.name ] = \ galaxy.tools.DatasetFilenameWrapper( input_values[ input.name ], @@ -254,7 +256,7 @@ if output.change_format: if params is None: params = make_dict_copy( incoming ) - wrap_values( tool.inputs, params ) + wrap_values( tool.inputs, params, skip_missing_values = not tool.check_values ) for change_elem in output.change_format: for when_elem in change_elem.findall( 'when' ): check = when_elem.get( 'input', None ) @@ -304,7 +306,7 @@ # <outputs> # <data format="input" name="output" label="Blat on ${<input_param>.name}" /> # </outputs> - wrap_values( tool.inputs, params ) + wrap_values( tool.inputs, params, skip_missing_values = not tool.check_values ) #tool (only needing to be set once) and on_string (set differently for each label) are overwritten for each output dataset label being determined params['tool'] = tool params['on_string'] = on_text Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.