Files
galaxy/test/functional/tools/output_auto_format.xml
T
John Chilton 4de71a0c82 Allow setting `auto_format="True" on tool output`s.
The metadata system will then "sniff" the outputs and set the type appropriately.

Tool used to demonstrate and test this functionality is included, run the test with:

    ./run_tests.sh -framework -id output_auto_format

If auto_format="true" than explicitly setting ``format="another_type"`` will prevent the tool from loading so that we can allow this to specify a default type later without breaking backward compatiblity.

Update 1:
 - Switched from ``format="auto"`` to ``auto_format="true"`` based on Dan's comments (https://github.com/galaxyproject/galaxy/pull/130).

Update 2:
 - Updated this to work when setting metadata internally.
 - Switch underlying representation of type from ``_auto_`` to ``_sniff_`` based on seeing a new block in ``galaxy.jobs``. ``auto`` indicates the tool should specify the datatype at runtime. This is in some ways the inverse of that (the tool telling Galaxy to detect the type instead of Galaxy telling the tool to) so I decided it would be best to not have ``auto`` and ``_auto_`` doing completely different things.
2015-04-22 12:45:11 -04:00

17 lines
522 B
XML

<tool id="output_auto_format" name="output_auto_format" version="1.0.0">
<command>cp $input 'out'</command>
<inputs>
<param name="input" type="data" format="data" label="An input dataset" help=""/>
</inputs>
<outputs>
<data auto_format="true" name="output" label="Auto Output" from_work_dir="out">
</data>
</outputs>
<tests>
<test>
<param name="input" value="simple_line.txt" ftype="txt" />
<output name="output" file="simple_line.txt" ftype="txt" />
</test>
</tests>
</tool>