commit/galaxy-central: dannon: Display an upgrade message for workflows when using a version other than what is specified in the saved workflow.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/d4d1d086e50d/ Changeset: d4d1d086e50d User: dannon Date: 2013-06-19 22:49:01 Summary: Display an upgrade message for workflows when using a version other than what is specified in the saved workflow. Affected #: 3 files diff -r 5df11b3f650d4dbaa9e8a37e6501271bc06a489e -r d4d1d086e50d70eecb13fa0b61f738f09f8eefdd lib/galaxy/webapps/galaxy/controllers/workflow.py --- a/lib/galaxy/webapps/galaxy/controllers/workflow.py +++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py @@ -1291,6 +1291,7 @@ # Build the state for each step errors = {} has_upgrade_messages = False + step_version_changes = [] # has_errors is never used # has_errors = False saved_history = None @@ -1448,6 +1449,8 @@ step.upgrade_messages = step.module.check_and_update_state() if step.upgrade_messages: has_upgrade_messages = True + if step.type == 'tool' and step.module.version_changes: + step_version_changes.extend(step.module.version_changes) # Any connected input needs to have value DummyDataset (these # are not persisted so we need to do it every time) step.module.add_dummy_datasets( connections=step.input_connections ) @@ -1478,6 +1481,7 @@ steps=workflow.steps, workflow=stored, has_upgrade_messages=has_upgrade_messages, + step_version_changes=step_version_changes, errors=errors, incoming=kwargs, history_id=history_id, diff -r 5df11b3f650d4dbaa9e8a37e6501271bc06a489e -r d4d1d086e50d70eecb13fa0b61f738f09f8eefdd lib/galaxy/workflow/modules.py --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -201,6 +201,7 @@ self.post_job_actions = {} self.workflow_outputs = [] self.state = None + self.version_changes = [] if self.tool: self.errors = None else: @@ -219,6 +220,8 @@ module = Class( trans, tool_id ) module.state = galaxy.tools.DefaultToolState() if module.tool is not None: + if d.get('tool_version', 'Unspecified') != module.get_tool_version(): + module.version_changes.append("%s: using version '%s' instead of version '%s' indicated in this workflow." % (tool_id, d.get('tool_version', 'Unspecified'), module.get_tool_version()) ) module.state.decode( d[ "tool_state" ], module.tool, module.trans.app, secure=secure ) module.errors = d.get( "tool_errors", None ) module.post_job_actions = d.get( "post_job_actions", {} ) diff -r 5df11b3f650d4dbaa9e8a37e6501271bc06a489e -r d4d1d086e50d70eecb13fa0b61f738f09f8eefdd templates/webapps/galaxy/workflow/run.mako --- a/templates/webapps/galaxy/workflow/run.mako +++ b/templates/webapps/galaxy/workflow/run.mako @@ -383,6 +383,22 @@ </div> %endif +%if step_version_changes: + <div class="infomessage"> + The following tools are beinge executed with a different version from + what was available when this workflow was last saved because the + previous version is no longer available for use on this galaxy + instance. + To upgrade your workflow and dismiss this message simply edit the + workflow and re-save it to update the stored tool version. + <ul> + %for vc in step_version_changes: + <li>${vc}</li> + %endfor + </ul> + </div> +%endif + %if workflow.annotation: <div class="workflow-annotation">${workflow.annotation}</div><hr/> 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.
participants (1)
-
commits-noreply@bitbucket.org