Commit Graph
15808 Commits
Author SHA1 Message Date
John Chilton 5584ece4fa Update ToolBox.update_shed_config to use config_filename instead of index.
Seems a more robust index, simplifies ToolPanelManager, etc....
2014-12-29 09:11:54 -05:00
John Chilton 6d85189efa Update calls to ToolPanelManager.get_shed_tool_conf_dict for clarity...
... in other words to note where index in the resulting tuple is not actually used. Doing this to enable hiding this implementation detail (index) from components in subsequent commits.
2014-12-29 09:11:54 -05:00
John Chilton 056a60de81 Refactor logic for removing tools from panels into ToolBox.
May seem sort of like Tool Shed specific stuff - but I think it can be reused elsewhere down the road. Regardless of this however as of this commit no external components directly access ToolBox.tool_panel or ToolBox.integrated_tool_panel - which I think is important - these should be internal details of the ToolBox (or newer modules it leverages).
2014-12-29 09:11:54 -05:00
John Chilton ae8b88817e Reuse new ToolBox.get_section method in ToolPanelManager.
This is a higher-level method and eliminates a couple more places where Tool Shed code is directly acceessing ToolBox.tool_panel.
2014-12-29 09:11:54 -05:00
John Chilton 62927d39f6 Method to abstract away ToolBox.tool_panel from tool_util.py.
Now only thing accessing ToolBox.tool_panel outside ToolBox itself is ToolPanelManager.
2014-12-29 09:11:54 -05:00
John Chilton 3bcda4fb87 Method to abstract away ToolBox.shed_tool_confs from tool_util.py.
Start a gradual process of referring to these as dynamic tool confs instead of shed tool confs. I would like like to make them more generally Galaxy-managed tool configurations and distinguish them from deployer-managed configurations - rather then having overtly ToolShed-only logic in ToolBox.
2014-12-29 09:11:54 -05:00
John Chilton f88115ceaa PEP-8 fixes for various Tool Shed components.
- lib/tool_shed/util/tool_util.py
 - lib/tool_shed/galaxy_install/tool_migration_manager.py.
 - lib/tool_shed/util/shed_util_common.py.
 - lib/galaxy/model/tool_shed_install/__init__.py.
2014-12-29 09:11:54 -05:00
John Chilton 8206f83b96 Reused get_section method to hide ToolBox.tool_panel from install_manager.py. 2014-12-29 09:11:54 -05:00
John Chilton caaebdf9ae Small simplification to tool_panel_manager.py. 2014-12-29 09:11:54 -05:00
John Chilton 23e9a53e8a Correct sample value for migrated tool config. 2014-12-29 09:11:54 -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 4068aaac92 Eliminate one reference to ToolBox.tool_panel in install_manager.py. 2014-12-28 11:23:44 -05:00
John Chilton 7af172dbda More centralization of code for registering tools in ToolBox. 2014-12-28 11:23:44 -05:00
John Chilton 9e3713da90 Tweak two ToolShed modules to clarify they don't use ToolSection...
... objects (directly anyway). I would like to refactor all the tool shed components to not deal directly with ToolSection objects but instead just pass around IDs.
2014-12-28 11:23:44 -05:00
John Chilton 9c2f32fc0d PEP-8 fixes for a few Tool Shed install components.
- lib/tool_shed/galaxy_install/install_manager.py
 - lib/tool_shed/galaxy_install/repository_dependencies/repository_dependency_manager.py
 - lib/tool_shed/galaxy_install/repair_repository_manager.py
2014-12-28 11:23:44 -05:00
John Chilton 6b6c3ac498 Fix remaining tool shed test cases for new escaped values.
I think in this case the values on the page are correct now - but the test framework needs to be updated to handle the escaped value.
2014-12-27 23:46:22 -05:00
John Chilton f515257ed8 Skip checking tool migrations for Galaxy in tool shed tests. 2014-12-27 17:49:16 -05:00
John Chilton 37f2504ac4 Add --no_cleanup option to tests. 2014-12-27 17:49:16 -05:00
John Chilton 74b233fbc8 Merge next-stable. 2014-12-27 17:35:51 -05:00
John Chilton 1f96fa9b33 Fixes for over escaping in c2bed0a.
Fixes dozens of tool functional tests.
2014-12-27 17:30:59 -05:00
John Chilton e2047635fc Merge pull request #614. 2014-12-26 17:33:02 -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 8c18def760 Eliminate direct in/get checks against toolbox.tools_by_id - use get_tool or has_tool. 2014-12-26 09:55:27 -05:00
John Chilton b2d6255a12 Remove unused method lib/galaxy/workflow/modules.py. 2014-12-26 09:55:27 -05:00
John Chilton 74a58ea2c2 Abstractions for registering tools from outside toolbox.
Part of effort to further limit exposing tools_by_id directly outside Toolbox.
2014-12-25 13:35:13 -05:00
John Chilton e455d42b61 Eliminate walking over tools_by_id externally from toolbox. 2014-12-25 13:35:13 -05:00
John Chilton ccf3794173 Centralize abstraction for removing tools from toolbox.
Shield's toolbox.tools_by_id from lib/tool_shed/galaxy_install/tools/tool_panel_manager.py.
2014-12-25 13:35:13 -05:00
John Chilton 047bfc0d3f Abstract out ToolBox internals from tool_shed.util.tool_util.
Instead of reloading upload actions at this level and exposing tools_by_id - move this logic into the ToolBox in a new method called handle_datatypes_changed().
2014-12-25 13:35:13 -05:00
John Chilton 6c385aa25a Reduce duplication/complexity in tool_panel_manager.py.
Big conditional in remove_guids switched on sectioned versus un-sectioned with very little difference in what was actually being done. This reduces the cyclomatic complexity of that method from 35 down to 26 (though it is still the most 'complex' method in that file by a wide margin).
2014-12-25 13:35:13 -05:00
John Chilton 8c40b5734e Eliminate repeated nested object access in ToolPanelManager.remove_guids. 2014-12-25 13:35:13 -05:00
John Chilton 7d0c6538b3 More ToolPanelManager unit testing. 2014-12-25 13:35:13 -05:00
John Chilton c70cc95128 Expose datatype converter information via datatype API.
With test case.
2014-12-25 12:24:23 -05:00
John Chilton 648067c932 Reduce repeated nested object access in galaxy.api.datatypes. 2014-12-25 12:24:23 -05:00
John Chilton a31a031b3b Update datatypes API to newer API decoarator/exception handling. 2014-12-25 12:24:23 -05:00
John Chilton f68a103ae0 Suite of API tests for exist datatypes endpoint. 2014-12-25 12:24:23 -05:00
John Chilton 44d94bb7cb Bugfix: Allow passing key to GET /api/datatypes/mapping.
All anonymous API endpoints should also allow authenticated access and just ignore the key.
2014-12-25 12:24:23 -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 f315f8ee76 Breakup big remove method in tool_panel_manager.py to ease testing.
Separate out logic for dealing with toolbox from logic for dealing repository metadata in the database.
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 1e800df93f PEP-8 and style tweaks to tool_panel_manager.py. 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 540b6edacd Introduce abstraction for reindexing tool search.
Fixes re-indexing after tool shed modifications for 5c44ac1 and reduces duplication.
2014-12-23 13:52:39 -05:00
John Chilton 41628b3faf PEP-8 fixes to tool_shed.galaxy_install.tools.tool_panel_manager. 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
John Chilton 82533c33e4 Update XML library use during tool parsing to elimiante FutureWarnings. 2014-12-23 13:52:39 -05:00