Commit Graph
229 Commits
Author SHA1 Message Date
John Chilton 7c9818c24a Fix unit tests for dde2fc9572.
Thanks to @ dannon for the bug report.
2015-02-24 12:02:39 -05:00
Dannon Baker fd500d7493 Fix path insertion vs appending of <galaxy>/lib for unit tests. 2015-02-12 10:37:44 -05:00
John Chilton 937a9eeef8 Fix unit tests for ddbe0d1. 2015-02-03 20:09:46 -05:00
Carl Eberhard 0ed95c89e3 Managers: re-implement url_for as overridable service, add tests for history contents 2015-02-02 14:13:54 -05:00
Carl Eberhard 66c86c9719 Managers: add shorthand for adding a serializer view, back off of class-level url service, more testing 2015-02-02 13:33:06 -05:00
Carl Eberhard f28120274d Managers: wire url_for in serializers under a class-level variable for overriding in tests, more test coverage (serializers) 2015-02-02 11:07:17 -05:00
John Chilton 4f223913e8 Temporary config option to isolate tool commands in their own shell.
Like done for Docker to isolate metadata commands from the environment modifications required to resolve tool dependencies. Should allow for Python 3 dependencies (originally also allowed samtools - but Nate other commit resolved that problem also).

Just meant as a config option for now - it will become the default once tested more thoroughly. For now enable it by setting enable_beta_tool_command_isolation to True in galaxy.ini.
2015-02-02 09:27:19 -05:00
Dannon Baker dba89dff83 Convert everything from elementtree to stdlib xml module. 2015-01-29 16:10:56 -05:00
Carl Eberhard ec3eec5609 Managers: normalize mixin names (remove Interface, Model, add where appropriate); Fix 'has' substr filter name in tests 2015-01-29 15:20:46 -05:00
Carl Eberhard b44ca3c578 History API: allow filtering, limit, and offset in index params; Implement managers/base.FilterParser to configure how models can be filtered; Change ModelManager.list to allow limit, offset, and post-query (functional) filters; Add user filter, limit, and offset parsers to BaseController; Add tests for previous; Remove some UserManager functions; Continue filling out Annotatable mixin 2015-01-29 10:42:54 -05:00
Carl Eberhard fe8bb01b78 Sharable managers: Generate slug on user share only if needed 2015-01-22 17:33:02 -05:00
Carl Eberhard c98f989cd2 (Manually) merge central 2015-01-15 10:16:33 -05:00
John Chilton facc29e8a9 Update workflow extraction backend for output collections. 2015-01-15 09:30:00 -05:00
John Chilton 44f7317fa5 Allow tools to output collections with static or determinable structure.
By "static" I mean tools such as a FASTQ de-interlacer that would produce a "paired" collection with two datasets everytime. By "determinable" I mean tools that perform N->N operations within the same job - such as a tool that needs to normalize a bunch of datasets all at once and not in separate jobs. (For N->N collection operations that should or can be done in N separate jobs tool authors should just write tools that operate over a dataset and produce a dataset and let the end-user 'map over' that operation.)

There are still large classes of operations where the structure of the output collection cannot be pre-determined - such as splitting files (e.g. bam files by read group) - that are not implemented in this commit.

Model:

The models have been updated to do a more thorough job of tracking collection outputs. Jobs just producing HistoryDatasetCollectionAssociations works fine for simple jobs producing collections - but you don't want to map a list over a tool that produces a pair and produce a bunch of pairs HDCAs and a list:pair HDCA- you just want a bunch of pieces and the one list:pair at that the top.

Workflow:

Workflows containing such operations can be executed - but the workflow editor has not been updated to handle this complexity (and it will require a significant overhaul) so such tools are not available in the workflow editor.

Tool Testing:

This commit also introduces a new tool XML syntax for describing tests on output collections. See files test/functional/tools/collection_creates_list.xml and test/functional/tools/collection_creates_pair.xml for examples.

Tests:

Includes two tools to test this - one that uses explicit pair output names and one that iterates over the structure of input list to produce an output list.

Includes several new tools API tests that test the tools described above via the API and implicit mapping over such tools. Includes two new workflow API tests - one that verifies a simple workflow with output collections works and one that verifies mapping over workflow steps in collections works.
2015-01-15 09:30:00 -05:00
Carl Eberhard 4c744f7275 Remove relative imports in managers; factor out circular ref in HDAManager using slight code dup; Fill out deserializers and provde generic manager for deserializer superclasses and mixins; Bug hunt with functional/browser tests 2015-01-14 17:26:41 -05:00
Carl Eberhard 52ff6ef5d0 Remove trans from method bodies where possible 2015-01-12 14:15:42 -05:00
Carl Eberhard fac23b2a1a History Mgr: eliminate the UsesHistoryMixin; HDA Mgr: move serveral methods into mgr from UsesHDAMixin; User Mgr: improve api generation/checking 2015-01-09 13:22:06 -05:00
Carl Eberhard 594daffc51 Unit test the collections manager; tweaks to user_shares in sharable 2015-01-08 16:23:51 -05:00
Carl Eberhard b40ca1c03c Minor fixes, cruft-removal; Exploring common dataset container interface for Histories, Collections, Libraries 2015-01-08 13:23:15 -05:00
Carl Eberhard 2806fbe83e More documentation; minor fixes 2015-01-07 14:55:37 -05:00
Carl Eberhard 9e25551161 Split out OwnableModelInterface (HDAs at the least may need this); Clean-up; Catching up on documentation 2015-01-06 15:01:34 -05:00
Carl Eberhard 8051f85fe2 Merged galaxy/galaxy-central into default 2015-01-05 10:35:20 -05:00
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 aa86181e7c Move ToolSection and ToolSectionLabel out of galaxy.tools directly.
Would like to move the whole ToolBox out of galaxy.tools and into galaxy.tools.toolbox but need to separate all dependencies on galaxy.tools first.
2014-12-31 18:21:10 -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 9b5f374189 Move galaxy.tools.filters to galaxy.tools.toolbox.filters.
Leave empty module in galaxy.tools.filters and modify config to ensure backward compatibility (filters in this old directory will continue to work for now).

Update config/galaxy.ini.sample with more discussion of ToolBox filter.
2014-12-29 23:07:01 -05:00
John Chilton 66625dfc69 Move galaxy.tools.watcher into galaxy.tools.toolbox.watcher. 2014-12-29 23:07:01 -05:00
John Chilton aad51263f0 Various ToolBox filtering improvements and tests.
- Allow overriding the base module location for ToolBox filters (needed for OS packages, etc...).
 - Allow scanning multiple base modules for filters.
 - Unit tests for module loading functionality, custom tool, label, and section filters, default hidden and require_login filters.
2014-12-29 23:07:01 -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 3b3ef1f85f Simplifications for ToolPanelManager.get_shed_tool_conf_dict.
None of the components using this method are using the index any more - so eliminate it. Also introduce a new ToolBox method to hide the details of ToolBox.shed_tool_confs from this method.
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 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 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 7d0c6538b3 More ToolPanelManager unit testing. 2014-12-25 13:35:13 -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
John Chilton fb1e9fc5f4 Start decoupling Toolbox elements from XML (sections+labels).
Just a small tweak and some tests to verify these things can indeed be created from dictionaries. Also slightly simplifies galaxy.tools.
2014-12-22 13:16:30 -05:00
Carl Eberhard 58f677ad4f Refining the hda manager, serializer, and de-serializer; using same in history contents and datasets api 2014-12-19 16:56:34 -05:00
Carl Eberhard 98db1349a4 Initial commit for changes to managers: implement base ModelManager, Serializer, and Deserializer; incorporate into hdas and histories managers; implement users, datasets nabagers; re-work histories api to use the managers better; unit tests for managers; search and destroy on UsesHistoryMixin; minor fixes to list-panel 2014-12-17 15:26:43 -05:00
John Chilton ace30535b2 Improvements to loading help text from tools.
Do not convert rst to a mako template until needed, this is a costly operation and has the potential to speed update Galaxy start time. Move logic related to parsing of simple help text blocks out of tool and into the new tool parser interface and add implementation for YAML-based tools as well as unit tests for both. More advanced, multi-page tool help is still possible, workflows with the old tool form, but is only available to XML-based tools.
2014-12-13 22:09:51 -05:00
John Chilton ec24396140 Refactoring: Start abstracting XML processing out of Tool and param classes.
Long term this could allow Galaxy to support - multiple tooling formats (Galaxy-like YAML, CWL http://bit.ly/cwltooldesc, etc...). But I think it is also important from a purely design perspective - this is a core logic class integrating different components - they should not also be doing XML parsing.

To verify the interface for parsing tools is expressive enough to allow multiple useful implementations, I built a test YAML tool description that implements many of the same features as Galaxy but smooths out rough edges (uses exit codes for job failure by default for instance). Loading these tools is disabled by default and it is not documented how to enable them because they are not intended to be part of Galaxy's public API.
2014-12-11 00:26:13 -05:00