Skip to content

Commit

Permalink
Add back tool id to pass unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 10, 2015
1 parent c143748 commit cd61cdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/workflow/modules.py
Expand Up @@ -551,6 +551,8 @@ def from_workflow_step( Class, trans, step ):
tool_version = step.tool_version
module = Class( trans, tool_id, tool_version=tool_version )
message = ""
if step.tool_version and (step.tool_version != module.tool.version):
message += "%s: Using version '%s' instead of version '%s' specified in this workflow. " % (tool_id, module.tool.version, step.tool_version)
if step.tool_id != module.tool_id: # This means the exact version of the tool is not installed. We inform the user.
old_tool_shed = step.tool_id.split( "/repos/" )[0]
if old_tool_shed not in tool_id: # Only display the following warning if the tool comes from a different tool shed
Expand All @@ -559,9 +561,7 @@ def from_workflow_step( Class, trans, step ):
new_url = module.tool.tool_shed_repository.get_sharable_url( module.tool.app ) + '/%s/' % module.tool.tool_shed_repository.changeset_revision
new_tool_shed_url = new_url.split( "/view" )[0]
message += "The tool \'%s\', version %s by the owner %s installed from <a href=\"%s\" target=\"_blank\">%s</a> is not available. " % (module.tool.name, tool_version, module.tool.repository_owner, old_url, old_tool_shed_url)
message += "A derivation of this tool installed from <a href=\"%s\" target=\"_blank\">%s</a> will be used instead. " % (new_url, new_tool_shed_url)
if step.tool_version and (step.tool_version != module.tool.version):
message += "Using version '%s' instead of version '%s' specified in this workflow." % (module.tool.version, step.tool_version)
message += "A derivation of this tool installed from <a href=\"%s\" target=\"_blank\">%s</a> will be used instead." % (new_url, new_tool_shed_url)
if message:
log.debug(message)
module.version_changes.append(message)
Expand Down

0 comments on commit cd61cdc

Please sign in to comment.