commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/91c6fa5712b5/ changeset: 91c6fa5712b5 user: jmchilton date: 2013-02-10 18:13:51 summary: Add optional "upload" attribute to tool definitions. When extracting workflows, such tools are treated as inputs. This eliminates the need for the hack of hardcoding 'upload1' in tools.py and allows multiple upload tools to exist and function properly when extracting workflows. affected #: 2 files diff -r 506484344db3a370f8ae24096041d38557d1967e -r 91c6fa5712b5eaac805b576418de699e216fa384 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1085,7 +1085,7 @@ 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: @@ -1653,7 +1653,7 @@ 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. @@ -1666,9 +1666,7 @@ # 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 util.string_as_bool( root.get( "upload", "False" ) ): return False # TODO: Anyway to capture tools that dynamically change their own # outputs? diff -r 506484344db3a370f8ae24096041d38557d1967e -r 91c6fa5712b5eaac805b576418de699e216fa384 tools/data_source/upload.xml --- a/tools/data_source/upload.xml +++ b/tools/data_source/upload.xml @@ -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" upload="true"><description> from your computer </description> https://bitbucket.org/galaxy/galaxy-central/commits/46b01a48a40d/ changeset: 46b01a48a40d user: jmchilton date: 2013-02-13 17:45:56 summary: Based on input from natefoo, replace root tool tag "upload" with inverse tag "workflow_compatible". Adjust logic in tools module accordingly. affected #: 2 files diff -r 91c6fa5712b5eaac805b576418de699e216fa384 -r 46b01a48a40d70ec5d5fa9c3a21a3e2dec4cee24 lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1666,7 +1666,7 @@ # right now if self.tool_type.startswith( 'data_source' ): return False - if util.string_as_bool( root.get( "upload", "False" ) ): + if not util.string_as_bool( root.get( "workflow_compatible", "True" ) ): return False # TODO: Anyway to capture tools that dynamically change their own # outputs? diff -r 91c6fa5712b5eaac805b576418de699e216fa384 -r 46b01a48a40d70ec5d5fa9c3a21a3e2dec4cee24 tools/data_source/upload.xml --- a/tools/data_source/upload.xml +++ b/tools/data_source/upload.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<tool name="Upload File" id="upload1" version="1.1.3" upload="true"> +<tool name="Upload File" id="upload1" version="1.1.3" workflow_compatible="false"><description> from your computer </description> https://bitbucket.org/galaxy/galaxy-central/commits/6b10699dc095/ changeset: 6b10699dc095 user: natefoo date: 2013-02-13 17:51:56 summary: Merged in jmchilton/galaxy-central-allow-additional-upload-tools (pull request #122) Add optional "upload" attribute to tool definitions. affected #: 2 files diff -r c19fa5da36cc51fd5ee6005ed801a7e2c9aba229 -r 6b10699dc0950691097400e83fa6b51e35501e6f lib/galaxy/tools/__init__.py --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1097,7 +1097,7 @@ 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 @@ 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 @@ # 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? diff -r c19fa5da36cc51fd5ee6005ed801a7e2c9aba229 -r 6b10699dc0950691097400e83fa6b51e35501e6f tools/data_source/upload.xml --- a/tools/data_source/upload.xml +++ b/tools/data_source/upload.xml @@ -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> 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)
-
Bitbucket