mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merged in jmchilton/galaxy-central-allow-additional-upload-tools (pull request #122)
Add optional "upload" attribute to tool definitions.
This commit is contained in:
@@ -1097,7 +1097,7 @@ class Tool( object ):
|
||||
if requirements_elem:
|
||||
self.parse_requirements( requirements_elem )
|
||||
# Determine if this tool can be used in workflows
|
||||
self.is_workflow_compatible = self.check_workflow_compatible()
|
||||
self.is_workflow_compatible = self.check_workflow_compatible(root)
|
||||
# Trackster configuration.
|
||||
trackster_conf = root.find( "trackster_conf" )
|
||||
if trackster_conf is not None:
|
||||
@@ -1665,7 +1665,7 @@ class Tool( object ):
|
||||
version = requirement_elem.get( "version", None )
|
||||
requirement = ToolRequirement( name=name, type=type, version=version )
|
||||
self.requirements.append( requirement )
|
||||
def check_workflow_compatible( self ):
|
||||
def check_workflow_compatible( self, root ):
|
||||
"""
|
||||
Determine if a tool can be used in workflows. External tools and the
|
||||
upload tool are currently not supported by workflows.
|
||||
@@ -1678,9 +1678,7 @@ class Tool( object ):
|
||||
# right now
|
||||
if self.tool_type.startswith( 'data_source' ):
|
||||
return False
|
||||
# HACK: upload is (as always) a special case becuase file parameters
|
||||
# can't be persisted.
|
||||
if self.id == "upload1":
|
||||
if not util.string_as_bool( root.get( "workflow_compatible", "True" ) ):
|
||||
return False
|
||||
# TODO: Anyway to capture tools that dynamically change their own
|
||||
# outputs?
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<tool name="Upload File" id="upload1" version="1.1.3">
|
||||
<tool name="Upload File" id="upload1" version="1.1.3" workflow_compatible="false">
|
||||
<description>
|
||||
from your computer
|
||||
</description>
|
||||
|
||||
Reference in New Issue
Block a user