Commit Graph
246 Commits
Author SHA1 Message Date
Carl Eberhard f93961c497 Merge testing 2015-04-16 11:09:11 -04:00
Carl Eberhard 5ebe04cfd0 Testing: fix failing unit tests that were recently added 2015-04-16 10:45:24 -04:00
Carl Eberhard 1bc86a5fba Testing: move managers, web/base, datatypes/dataproviders, and visualization 'unit'(?) tests to using common mock objects and loading system; cleanup 2015-04-16 10:25:34 -04:00
Dannon Baker 1f90dfd86a Merge pull request #115 from guerler/revise_validation
Revise late validation of tool parameters
2015-04-16 09:58:14 -04:00
Dannon Baker 4ee3396793 Merge pull request #119 from jmchilton/toolbox_auth
Stronger toolbox filtering.
2015-04-15 17:28:33 -04:00
guerler c9d5a14304 Adjust late validation test cases 2015-04-15 15:41:03 -04:00
John Chilton afcf899f13 Stronger toolbox filtering.
- Update toolbox filtering rules to also filter on tool.allow_user_access.
 - Use toolbox filtering when listing tools not in the context of panel (so filtered tools are not returned from the API).

See also:

 - https://trello.com/c/jyl0cvFP
 - https://trello.com/c/Sg8D2PBj
 - http://dev.list.galaxyproject.org/Bug-Toolbox-filters-not-applied-in-workflows-td4662879.html

Testing:

The following command will run a superset of relevant tests:

    ./run_tests.sh -u test/unit/tools
2015-04-15 14:40:50 -04:00
John Chilton 0fe2b601ce Implement detect_errors attribute on XML.
If present, it can be one of

 - "default", no-op fallback to stdio tags and erroring on standard error output.
 - "exit_code", error if tool exit code is not 0. (The @jmchilton recommendation).
 - "aggressive", error if tool exit code is not 0 or either Exception: or Error: appears in standard error/output. (The @bgruening recommendation).

Refactoring and unit/functional tests to support and demonstrate this.

Run functional test with:

    ./run_tests.sh -framework -id detect_errors_aggressive

Run relevant unit tests:

    nosetests test/unit/tools/test_parsing.py

Updated from original version to reflect comments on pull request #117 - in particular the ``detect_errors`` tag was moved from ``tool`` to ``command``.
2015-04-15 12:38:35 -04:00
Carl Eberhard 179d11db85 Merge managers.datasets with dev and remove conflicts 2015-04-02 14:39:45 -04:00
Carl Eberhard c1f721086f Managers: attempt to extract trans from de/serializers 2015-04-02 13:49:03 -04:00
Carl Eberhard fafea361ac Managers: remove trans param as much as possible (this results in some clunky use of current_history kwarg) 2015-04-01 15:21:25 -04:00
Carl Eberhard f8c6725c42 Managers, filters: allow remapping of attribute keys; expand tests 2015-03-31 15:35:17 -04:00
Carl Eberhard 9f1be65937 Managers: re-add dataset assoc job methods, move primary id serialization into base serializer, minor fixes and refactoring, expand tests 2015-03-31 11:15:49 -04:00
Carl Eberhard 188ff0076f Managers, Users: corrections and refactoring, expansion of tests 2015-03-30 18:00:13 -04:00
Carl Eberhard c3f30fbdc5 Managers: refactor hda manager into dataset/dataset assoc/etc., begin to expand rbac security for datasets, expand tests 2015-03-29 19:58:12 -04:00
John Chilton 3813429f7e Refactor tool status check objects into parse module.
Part of ongoing effort to isolate the galaxy.tools.parser and not have it depend on things in galaxy.tools outside that module.
2015-03-25 14:43:53 -04:00
Nate Coraor d242286187 Fix unit test broken by set_metadata changes. 2015-03-05 09:55:11 -05:00
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