Commit Graph
46 Commits
Author SHA1 Message Date
John Chilton d189910ede Allow workflow uploads to specify publishable/importable.
Use new capabilities to improve workflow testing.
2014-08-08 09:16:55 -04:00
John Chilton 5d9f64358f Work toward making workflows API use newer standards.
Convert workflow API to use new-style API decorator throughout.

Improved workflow exception handling - now more explicit status code setting and returning of raw error strings in the API. Most obvious exceptional paths out of the API are now coming through MessageExceptions of things even more specific. Add API tests for many of these exceptional conditions.

Use more helper methods to reduce method length, duplication.
2014-08-08 09:16:55 -04:00
John Chilton 425789a800 More RESTful direct workflow creation from JSON.
Previous route was "POST /api/workflows/upload", this still works but should be condisdered deprecated in favor
of POSTing to /api/workflows with 'workflow' in the payload.
2014-08-08 09:16:55 -04:00
John Chilton 22819d88ce API tests for authenticate and some of users endpoints. 2014-08-04 21:45:02 -04:00
John Chilton c85d14f7a1 Cleanup test case in e7ba2469bca0cb7a1d5a8d754885537dc683d490. 2014-08-04 09:38:05 -04:00
John Chilton 7fdcf1b462 Test cases and test workflows to verify workflow import stability. 2014-08-04 09:33:40 -04:00
John Chilton 6b31f7ba5d Improved API collection workflow run testing.
Remove some duplication between workflow and tool testing code.
2014-07-29 11:55:46 -04:00
John Chilton 5979ac41c8 Allow using data collection steps via workflow API.
Implement API test for this and fixup test for previous commit related improved workflow run endpoint.
2014-07-28 19:18:40 -04:00
John Chilton 6c0432980b Easier to use input mapping when running workflows.
The old 'ds_map' parameter remains in place for backward compatibility and with the same behavior. A new parameter 'inputs' can now be specified instead however, and its keys corresponding to the steps 'order_index' instead of the raw unencoded database ids 'ds_map' uses. This variant has the nice property that this map can be constructed without prior knowledge of how Galaxy will assign ids during import - hence it is easier to use and more portable.

Additionally, 'inputs' is more flexiable and can revert to the old behavior by specifying a new parameter 'inputs_by' as 'step_id'. 'inputs_by' can also be 'name' - this is even more human friendly because it will assign the ids based on data input names (this is what I intend to use mostly, but I have not made it the default because not all workflows will have data inputs with distinct names).

Finally, the new name 'inputs' will be more appropriate once data collection inputs can be explicitly mapped via the API.
2014-07-28 19:18:39 -04:00
John Chilton 2b78724d9b Workflow test utility build ds_map more easily.
Probably should do something like this server side so workflow API can be used more deterministically (wouldn't need to import a workflow and then hit the API to know how to use it).
2014-07-25 14:47:34 -05:00
John Chilton 336aa4c31a Fix API tests for 879c485...
Which made tool multirun link/match instead cross producting (will someday figure a terminology for this :)).
2014-07-25 11:51:11 -05:00
John Chilton 659381bf80 Extend API test timeouts.
Some buildbot API tests are timing out waiting but work locally, I suspect this will fix the problem.
2014-07-25 11:51:10 -05:00
John Chilton 4a498fd8b4 Fix spelling error in API test. 2014-06-13 08:46:01 -05:00
John Chilton a726f11df7 More extract functional tests.
Add test for extracting copied, mapped datasets and copied input dataset collections from history.
2014-05-28 20:25:53 -05:00
John Chilton 605532e5ba Bugfix for a06c6c9.
With improved testing :).
2014-05-28 20:25:53 -05:00
John Chilton 2e667131a8 Collections: Add API ability to copy HDCA mirroring HDA operations. 2014-05-28 15:28:55 -05:00
John Chilton f06ce6a42f Workflow extraction test from copied datasets.
Detailed some bugs I found in the test case and recorded them here https://trello.com/c/mKzLbM2P.
2014-05-28 11:58:33 -05:00
John Chilton 86a3b94d58 Improvements to workflow extraction tests. 2014-05-28 11:58:33 -05:00
John Chilton fc8ee54ce2 Bugfix: Explicitly enforce implicit collection unique element identifier constraint.
Think this is responsible for bug when collections API does not create as many collections as requested.
2014-05-27 08:20:39 -05:00
John Chilton b0c250d791 Fix provenance controller for non-admins.
Cannot pass check_accessible=True to get_object with HistoryDatasetAssociations (because item.user is undefined.).
2014-05-21 14:33:24 -05:00
John Chilton 8e6bcf72c7 Merged in jmchilton/galaxy-central-fork-1 (pull request #387)
Recursive Tool Parameter Dictification
2014-05-15 13:43:43 -05:00
John Chilton d7b4b36756 Change paired collections terminology from left/right to forward/reverse.
If you have paired datasets in your database they will no longer work - send me an e-mail and I can give you an SQL update statement.
2014-05-15 13:01:36 -05:00
John Chilton 486dc41639 Bugfix for updating history dataset collection name.
Thanks to Bjoern for the bug report.

This attribute had been DatasetCollection in earlier versions of this code and the update code was only partially cut-over to use the new location for name (on HistoryDatasetCollectionAssociation).
2014-05-14 05:26:21 -05:00
John Chilton fcae5f51ff Add API functional test for workflow extraction of collection reductions. 2014-05-11 13:56:49 -05:00
John Chilton 3109f70c3a Allow more typical expanded HDCA value with src when mapping over collection via API.
Flat ID still used by GUI - but when coming through API this is probably the better choice.
2014-05-11 13:56:49 -05:00
John Chilton 9256b438de Improvements to to_dict for Conditional tool parameters.
Expand out nested test_param parameter and cases.
2014-05-08 17:55:00 -05:00
John Chilton b36fdcb022 Improvements to to_dict for Repeat tool parameters.
Expand out nested parameters and more information about the repeat itself.
2014-05-08 17:55:00 -05:00
John Chilton 6d0de9ba11 Bugfix: (For bf60fa7) Only initial mapping steps in map reduce workflows were being connected correctly.
With expanded test case that checks such a connection. This takes care of of subsequent connections by iteratively updating hid_to_output_pair correctly (... I think, test works with at least two).
2014-05-08 16:12:07 -05:00
John Chilton b684f4a13e Add simple collection mapping workflow extraction functional test. 2014-05-08 16:12:07 -05:00
John Chilton 203dfe9903 Reduce polling frequency of API tests, seems to help prevent sqlite locks. 2014-05-08 16:12:07 -05:00
John Chilton 2f8970a6a7 Bugfix: Rework collection matching logic so it properly matches combined collection/subcollection mapping.
With functional test to verify it works end-to-end with tool execution and unit tests to verify different kinds of collection combinations.
2014-05-07 15:39:03 -05:00
John Chilton 6a4c14e6d2 Simpler, more powerful subcollection mapping.
Collections can be mapped over 'data' parameters and sufficiently nested collections can be mapped over 'data_collection' parameters (for instance a list of 5 pairs can be supplied to a tool taking in a pair and 5 jobs will be executed). I (perhaps poorly) term these concepts collection mapping and subcollection mapping.

Prior to this changeset - the API for doing collection 'mapping' and 'subcollection mapping' was somewhat more divergent and the tool execution code explicitly forbid doing both kinds of mappings in the same tool execution even if the effective collections could be matched (e.g. it could not map a 'data' parameter over a list of 5 datasets and a pair parameter a list of 5 pairs in the same execution).

This changeset should remedy this - as long as the effective collection mappings can match up such jobs should be possible. The workflow editor (and I think runner) already thought this was possible, so this changeset reduces the tool-workflow impedance mismatch - an existing problem exacerbated by recent dataset collections introduction.

This all needs much more testing - test workflows execute this way, functional test of a tool execution that combines collection mapping and subcollection mapping, etc....
2014-05-07 11:29:51 -05:00
John Chilton 1359c4a780 Improve API test skipping when required tools are absent.
Replace ad-hoc tools API test method for skipping tests with a more general purpose decorator. Use new decorator to specify required tools for workflow tests.
2014-05-07 00:24:00 -05:00
John Chilton 2df5cfe008 Bugfix: Track collection_type when extracting collection inputs from histories.
Add functional test to verify the correctness of this tracking.

TODO: refactor __skip_unless_tool from tools test so this new workflow test can be skipped if not run with -with_framework_test_tools.
2014-05-06 16:08:30 -05:00
John Chilton 8227e4754c Bugfix: galaxy.workflow.extract expects hids - API was consuming encoded ids.
API now properly expects hids. That was unfortunate - need to figure out why the existing functional test did not break because of this and improve it.
2014-05-06 16:08:30 -05:00
John Chilton e0ee48c7bd Fix bug in test/api/test_tools.py. 2014-05-06 13:52:49 -05:00
John Chilton 3cdf45e847 Move dataset colleciton test populator. 2014-05-06 13:52:49 -05:00
John Chilton deda734e0a Fix location of test_dataset_collections.py.
Didn't rebase properly.
2014-05-06 13:52:49 -05:00
John Chilton 60824d91b3 More refactoring away from mixins and toward 'data populators' in API tests. 2014-05-06 13:52:49 -05:00
John Chilton 704446ea24 Dataset collections - tools API returns implicitly created collections.
Use improvements to write better functional tests, ensure element identifiers preserved.
2014-05-06 08:54:31 -05:00
John Chilton 7d14e29091 Dataset collections - allow mapping collection params over subcollections. 2014-05-06 08:54:30 -05:00
John Chilton 5410d476e8 Dataset collections - "reduce" with existing tools.
Allow users to select dataset collections in place of individual datasets for data tool parameters with multiple="true" enabled (if all elements of collection would be valid as input to this parameter).

Restrict collection reductions to flat collections. If a user wanted to reduce a nested collection they probably want to map of the subcollections reducing each and building a collection of the reductions. TODO: The sentence is probably unintelligiable, need to provide a concrete example.

A functional test demonstrating these reductions in included.
2014-05-06 08:54:30 -05:00
John Chilton 8168334297 Dataset collections - "map" with existing tools (backend).
Allow replacing data parameter inputs with collections - this will cause the tool to produce multiple jobs for the submission - one for each combination of input parameters after being matched up (linked). In addition to various unit tests, functional tests demonstrate the API usage in `test/functional/api/test_tools.py`.
2014-05-06 08:54:30 -05:00
John Chilton d63f9c9149 Allow running tools on multiple datasets simulatenously (backend+API).
Each data tool parameter can be specified via a similar named parameter but with the suffix |__multirun__. This second parameter variant should be a list of datasets - one job will be created for each such dataset. In addition to various unit tests, various functional tests demonstrates this functionality in `test/functional/api/test_tools.py`.
2014-05-06 08:54:30 -05:00
John Chilton 3dc4b16c00 Dataset collections - infrastructure glue.
Add an API and service layer for dataset collections.
2014-05-06 08:54:30 -05:00
Dave Bouvier 424efdcf9a Moved API tests to live under test/ rather than test/functional/. Removed test for DNAse flanked genes. Added test for UCSC table browser. 2014-04-30 15:35:57 -04:00