Skip to content

Commit 7cca2e4

Browse files
committed
Update galaxy.xsd to allow version_command's to have an interpreter attribute.
1 parent 1ef05d2 commit 7cca2e4

File tree

1 file changed

+48
-19
lines changed

1 file changed

+48
-19
lines changed

planemo/xml/xsd/tool/galaxy.xsd

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,7 @@ the tool menu immediately following the hyperlink for the tool (based on the
6161
</xs:annotation>
6262
</xs:element>
6363
<xs:element name="parallelism" type="Parallelism" minOccurs="0"/>
64-
<xs:element name="version_command" type="xs:string" minOccurs="0">
65-
<xs:annotation>
66-
<xs:documentation xml:lang="en"><![CDATA[Specifies the command to be run in
67-
order to get the tool's version string. The resulting value will be found in the
68-
"Info" field of the history dataset.
69-
70-
Unlike the [``command``](#tool|command) tag, this value is taken as a literal and so there is no
71-
need to escape values like ``$`` and command inputs are not available for variable
72-
substitution.
73-
74-
### Example
75-
76-
```xml
77-
<version_command>tophat -version</version_command>
78-
```
79-
]]></xs:documentation>
80-
</xs:annotation>
64+
<xs:element name="version_command" type="VersionCommand" minOccurs="0">
8165
</xs:element>
8266
<xs:element name="action" type="ToolAction" minOccurs="0" maxOccurs="1" />
8367
<xs:element name="environment_variables" type="EnvironmentVariables" minOccurs="0" maxOccurs="1"/>
@@ -1428,7 +1412,7 @@ many of the default assertion tags that come with Galaxy and examples of each
14281412
can be found below.
14291413
14301414
The implementation of these tags are simply Python functions defined in the
1431-
[``galaxy.tools.verify.asserts``](https://github.com/galaxyproject/galaxy/tree/dev/lib/galaxy/tools/verify/asserts]
1415+
[``galaxy.tools.verify.asserts``](https://github.com/galaxyproject/galaxy/tree/dev/lib/galaxy/tools/verify/asserts)
14321416
module.
14331417
]]>
14341418
</xs:documentation>
@@ -4134,7 +4118,6 @@ define.</xs:documentation>
41344118
</xs:simpleContent>
41354119
</xs:complexType>
41364120

4137-
41384121
<xs:complexType name="ConfigFiles">
41394122
<xs:annotation>
41404123
<xs:documentation xml:lang="en"><![CDATA[See
@@ -4270,6 +4253,52 @@ response to this directive.
42704253
</xs:simpleContent>
42714254
</xs:complexType>
42724255

4256+
<xs:complexType name="VersionCommand">
4257+
<xs:annotation>
4258+
<xs:documentation xml:lang="en"><![CDATA[Specifies the command to be run in
4259+
order to get the tool's version string. The resulting value will be found in the
4260+
"Info" field of the history dataset.
4261+
4262+
Unlike the [``command``](#tool|command) tag, with the exception of the string
4263+
``$__tool_directory__`` this value is taken as a literal and so there is no
4264+
need to escape values like ``$`` and command inputs are not available for variable
4265+
substitution.
4266+
4267+
### Examples
4268+
4269+
A simple example for a [TopHat](https://ccb.jhu.edu/software/tophat/index.shtml)
4270+
tool definition might just be:
4271+
4272+
```xml
4273+
<version_command>tophat -version</version_command>
4274+
```
4275+
4276+
An example that leverages a Python script (e.g. ``count_reads.py``) shipped with
4277+
the tool might be:
4278+
4279+
```xml
4280+
<version_command>python $__tool_directory__/count_reads.py</version_command>
4281+
```
4282+
4283+
Examples are included in the test tools directory including:
4284+
4285+
- [version_command_plain.xml](https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/version_command_plain.xml)
4286+
- [version_command_tool_dir.xml](https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/version_tool_dir.xml)
4287+
- [version_command_interpreter.xml](https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/version_command_interpreter.xml) (*deprecated*)
4288+
4289+
]]></xs:documentation>
4290+
</xs:annotation>
4291+
<xs:simpleContent>
4292+
<xs:extension base="xs:string">
4293+
<xs:attribute name="interpreter" type="xs:string">
4294+
<xs:annotation>
4295+
<xs:documentation xml:lang="en"><![CDATA[*Deprecated*: Prefix the version command with an interpreter and the tool directory in order to execute a script shipped with the tool. It is better to just use ``<interpreter> $__tool_directory__/<script_name>``.]]></xs:documentation>
4296+
</xs:annotation>
4297+
</xs:attribute>
4298+
</xs:extension>
4299+
</xs:simpleContent>
4300+
</xs:complexType>
4301+
42734302
<xs:complexType name="RequestParameterTranslation">
42744303
<xs:annotation>
42754304
<xs:documentation xml:lang="en"><![CDATA[

0 commit comments

Comments
 (0)