Commit Graph
15 Commits
Author SHA1 Message Date
John Chilton 6dd7f5a0fb Unit test to verify tool panel handles multiple successive TS install...
In particular that the integrated panel reflects all the installed tools but that they are groupped correctly in ToolBox._tool_panel.
2015-01-01 10:02:23 -05:00
John Chilton 7e45ca2a72 Allow multiple tools with the same id in ToolBox.
How to use:

 1.) Place multiple tools with different IDs in your tool conf.
 2.) ... ummm ... no step 2 - just use the tools.

Implementation:

The Tool Shed allows tool lineages by assigning each tool version a GUID and tracking versions in a database. This
implementation works by simply allowing the ToolBox to contain multiple tools with the same ID and orders them by the version specified by the tool author.

To track enable this a second tool lineage has been introduced that just uses tool versions instead of a database (non-toolshed installed tools are not longer placed into the Tool Shed install database). The ToolBox has been updated to allow multiple versions per tool id (defaulting to the 'latest' version for all operations which do not specify a version). Both jobs and workflow steps would track tool versions but did not use that version when fetching tools from the Toolbox - these components have been updated to try to use the tool version.

Unit tests working through most of the ToolBox and tool panel have been added, as well as functional tests exercising the tools API and to ensure workflows now at least attempt to respect tool versions (still kind of silently switches versions in some cases). Manual tests against the new tool form seem to demonstrate the tool switching and tool re-running work with only minor changes to the tools API and the job handler.
2014-12-31 18:21:10 -05:00
John Chilton 2717c85e54 Update attribute and method names in ToolBox to reflect encapsulation efforts.
Using ToolBox._xxx instead of ToolBox.__xxx because realistically ToolBox is still much to large to grok and so I imagine it will need to be broken up even more (base class focused on just the panel details perhaps - or mixins - etc...).
2014-12-29 12:23:55 -05:00
John Chilton 0e17abd7ea Fix unit tests for 7cee92f. 2014-12-29 11:10:41 -05:00
John Chilton 7dca5cb1f6 Bugfix for 44dfa6f and typos in unit tests that caused it to go undetected. 2014-12-28 23:25:56 -05:00
John Chilton 280dc18442 De-duplication for loading elements into the tool panel.
Create one public method load_item on ToolBox that should be used externally instead of load_tool_tag_set, load_section_tag_set, etc.... This reduces the duplication within the toolbox and between the toolbox and the Tool Shed's ToolPanelManager. Probably more importantly it also is another step down the road toward hiding implementation details such as toolbox.tool_panel and toolbox.intergrated_tool_panel from the ToolPanelManager.

Already had unit test coverage for ToolPanelManager stuff here - but added test coverage for loading labels, workflows, and tool directories.
2014-12-28 11:23:44 -05:00
John Chilton 36599a16d2 Simplify shed-y logic in load_tool_tag_set.
Drops cycolomatic complexity from 14 to 10 for that method.
2014-12-28 11:23:44 -05:00
John Chilton 974a4c124f Introduce abstraction shielding toolbox.tools_by_id from galaxy.workflow.modules.
That was the last module outside of ToolBox itself that was accessing tools_by_id directly.
2014-12-26 09:55:27 -05:00
John Chilton fd1c34b4c9 Unit test coverage for removing stuff from the toolbox.
Covers cases for tools inside and outside of sections and both deactivation versus uninstallation.
2014-12-24 00:42:54 -05:00
John Chilton 0e0b3199e7 Add tool lineage test for tools outside of sections. 2014-12-23 22:17:55 -05:00
John Chilton fd1ab33231 Unit test for tool panel merging tools by tool shed lineage. 2014-12-23 21:42:37 -05:00
John Chilton 00f68131df More tool panel manager unit tests.
(Including adding file missing with previous commit 697b58f0.)
2014-12-23 21:42:37 -05:00
John Chilton b292873de6 Move ToolPanelManager operation to create or get section into ToolBox.
Now with unit test. Part of broader effort to make ToolBox interface more explicit, tested, and hide implementation details from other parts of code (such as ToolPanelManager).

Also reworked the code to now build up and re-parse XML structures - just use a dictionary - thanks to 34b3e1c.
2014-12-23 14:22:08 -05:00
John Chilton 1acda2715f Introduce abstraction for updating ToolBox's shed configs.
Hides some details of writing out integrated tool panel, reindexing, etc... from tool shed install code and reduces duplicatation in tool shed's tool_panel_manager.

Add unit tests.
2014-12-23 13:52:39 -05:00
John Chilton d2081e1fea Start work on unit tests for galaxy.tools.ToolBox. 2014-12-23 13:52:39 -05:00