1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/7389f864f07f/ changeset: r5321:7389f864f07f user: dan date: 2011-04-02 00:10:47 summary: Better handling of errors on rerun when grouping constructs have been added or removed. affected #: 3 files (1.1 KB) --- a/lib/galaxy/model/__init__.py Fri Apr 01 11:36:55 2011 -0400 +++ b/lib/galaxy/model/__init__.py Fri Apr 01 18:10:47 2011 -0400 @@ -103,14 +103,14 @@ # For historical reasons state propogates down to datasets for da in self.output_datasets: da.dataset.state = state - def get_param_values( self, app ): + def get_param_values( self, app, ignore_errors=False ): """ Read encoded parameter values from the database and turn back into a dict of tool parameter values. """ param_dict = dict( [ ( p.name, p.value ) for p in self.parameters ] ) tool = app.toolbox.tools_by_id[self.tool_id] - param_dict = tool.params_from_strings( param_dict, app ) + param_dict = tool.params_from_strings( param_dict, app, ignore_errors=ignore_errors ) return param_dict def check_if_output_datasets_deleted( self ): """ --- a/lib/galaxy/tools/__init__.py Fri Apr 01 11:36:55 2011 -0400 +++ b/lib/galaxy/tools/__init__.py Fri Apr 01 18:10:47 2011 -0400 @@ -1252,7 +1252,21 @@ for input in inputs.itervalues(): # No value, insert the default if input.name not in values: - messages[ input.name ] = "No value found for '%s%s', used default" % ( prefix, input.label ) + if isinstance( input, Conditional ): + messages[ input.name ] = { input.test_param.name: "No value found for '%s%s', used default" % ( prefix, input.label ) } + test_value = input.test_param.get_initial_value( trans, context ) + current_case = input.get_current_case( test_value, trans ) + self.check_and_update_param_values_helper( input.cases[ current_case ].inputs, {}, trans, messages[ input.name ], context, prefix ) + elif isinstance( input, Repeat ): + if input.min: + messages[ input.name ] = [] + for i in range( input.min ): + rep_prefix = prefix + "%s %d > " % ( input.title, i + 1 ) + rep_dict = dict() + messages[ input.name ].append( rep_dict ) + self.check_and_update_param_values_helper( input.inputs, {}, trans, rep_dict, context, rep_prefix ) + else: + messages[ input.name ] = "No value found for '%s%s', used default" % ( prefix, input.label ) values[ input.name ] = input.get_initial_value( trans, context ) # Value, visit recursively as usual else: --- a/lib/galaxy/web/controllers/tool_runner.py Fri Apr 01 11:36:55 2011 -0400 +++ b/lib/galaxy/web/controllers/tool_runner.py Fri Apr 01 18:10:47 2011 -0400 @@ -120,7 +120,7 @@ error( "The '%s' tool does not currently support rerunning." % tool.name ) # Get the job's parameters try: - params_objects = job.get_param_values( trans.app ) + params_objects = job.get_param_values( trans.app, ignore_errors = True ) except: raise Exception( "Failed to get parameters for dataset id %d " % data.id ) upgrade_messages = tool.check_and_update_param_values( params_objects, trans ) 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.