Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of writing out the tools on startup (a more expensive operation than reading), just read the existing files in. Add new abstraction to the tool panel to reduce some otherwise duplicated code. Testing: The following two API tests should cover the modified behavior, they verify that metadata is still detectable and that history import and export still works. ``` ./run_tests.sh -api test/api/test_histories.py:HistoriesApiTestCase.test_import_export ./run_tests.sh -with_framework_test_tools -api test/api/test_tools.py:ToolsTestCase.test_rdata_not_decompressed ```
- Loading branch information
Showing
6 changed files
with
51 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<tool id="__SET_METADATA__" name="Set External Metadata" version="1.0.1" tool_type="set_metadata"> | ||
<type class="SetMetadataTool" module="galaxy.tools"/> | ||
<requirements> | ||
<requirement type="package">samtools</requirement> | ||
</requirements> | ||
<action module="galaxy.tools.actions.metadata" class="SetMetadataToolAction"/> | ||
<command>python "${set_metadata}" ${__SET_EXTERNAL_METADATA_COMMAND_LINE__}</command> | ||
<inputs> | ||
<param format="data" name="input1" type="data" label="File to set metadata on."/> | ||
<param name="__ORIGINAL_DATASET_STATE__" type="hidden" value=""/> | ||
<param name="__SET_EXTERNAL_METADATA_COMMAND_LINE__" type="hidden" value=""> | ||
<sanitizer sanitize="False"/> | ||
</param> | ||
</inputs> | ||
<configfiles> | ||
<configfile name="set_metadata">from galaxy_ext.metadata.set_metadata import set_metadata; set_metadata()</configfile> | ||
</configfiles> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<tool id="__EXPORT_HISTORY__" name="Export History" version="0.1" tool_type="export_history"> | ||
<type class="ExportHistoryTool" module="galaxy.tools"/> | ||
<action module="galaxy.tools.actions.history_imp_exp" class="ExportHistoryToolAction"/> | ||
<command>python $export_history $__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__ $output_file</command> | ||
<inputs> | ||
<param name="__HISTORY_TO_EXPORT__" type="hidden"/> | ||
<param name="compress" type="boolean"/> | ||
<param name="__EXPORT_HISTORY_COMMAND_INPUTS_OPTIONS__" type="hidden"/> | ||
</inputs> | ||
<configfiles> | ||
<configfile name="export_history">from galaxy.tools.imp_exp.export_history import main; main()</configfile> | ||
</configfiles> | ||
<outputs> | ||
<data format="gzip" name="output_file"/> | ||
</outputs> | ||
</tool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters