Commit Graph
1480 Commits
Author SHA1 Message Date
John Chilton f823278efd Fix bug in workflows test for implicit connections between steps.
It would fail when being run with the rest of the suite and not on its own - because it was using the same id for the workflow id and invocation id - which is obviously wrong unless it is a completely fresh database :).
2015-03-03 09:37:30 -05:00
John Chilton fc0a6d8764 Fix intermittently failing test test_workflow_run_dynamic_output_collections.
Love it when the bugs correspond to actual TODOs I left in the code.
2015-03-03 09:30:55 -05:00
John Chilton 391abd5fd6 Remove assert False from test/api/test_workflows_from_yaml.py.
These aren't ideal tests - but it is some indication that things are working that the API will import the workflow and produce a representation. Should follow up at some point and verify the representation is in fact the correct one.
2015-03-02 22:39:58 -05:00
John Chilton f8bfe89c42 Clarify failing test test_tools.py. 2015-03-02 22:39:58 -05:00
John Chilton a20938fc48 Attempt to fix intermittently failing jobs API test.
Retry check several times in case there is some sort of timing problem where a history turns okay - before a job. Improve assertion error message.
2015-03-02 22:39:50 -05:00
John Chilton b1f3654208 Tool data API testing fixes.
- Add files I didn't commit previously in test/functional/tool-data/.
 - Comment out test for tool data table deletion since Dan fixed the problem of regular users running data managers through the API (https://github.com/galaxyproject/galaxy/commit/48f77dc742acf01ddbafafcc4634e69378f1f020) that I previously exploited to write the test.
2015-03-02 22:36:24 -05:00
Dannon Baker 5c94d23d2d Merge bugfix from next-stable. 2015-02-17 15:18:45 -05:00
Dannon Baker f22ef12467 Fix xml.etree relative import error happening in test/asserts/xml.py 2015-02-17 15:18:08 -05:00
John Chilton bc9548753d Fix tool shed tests for GALAXY_TEST_DB_TEMPLATE unset.
I guess everyone who has ran tool shed tests in the last couple years has set either that or GALAXY_TEST_DBURI? Odd.
2015-02-17 14:02:04 -05:00
Carl Eberhard 045625c829 History, API: allow purging with url parameter passing e.g. '...?purge=True', add test 2015-02-16 14:25:03 -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 d8179ae64f Fix incorrect constant pointed out by Nicola.
https://bitbucket.org/galaxy/galaxy-central/pull-request/664/remove-test-data-only-used-by-remaining/diff#comment-5083073.
2015-02-11 13:15:21 -05:00
John Chilton 700e9f7c94 Merged in jmchilton/galaxy-central-fork-1 (pull request #664)
Remove test-data only used by remaining tools.
2015-02-11 13:00:05 -05:00
Carl Eberhard 60e2a0b3df UI, paired collection creator: refactor autopairing and add tests 2015-02-10 18:15:43 -05:00
Carl Eberhard 3ec57d0833 UI, utils: modularize (AMD) naturalSort and move to utils 2015-02-10 13:42:59 -05:00
Carl Eberhard b3f39b8d5a UI, paired collection creator: move to underscore fn binding, allow name param in createList, add qunit test and data 2015-02-10 13:38:30 -05:00
John Chilton 38679a0d32 Dynamically fetch and cache test-data from git repositories if needed...
... for tool tests. Longer term this functionality should be dropped (i.e. after all the tools are out of Galaxy) and the test-data always lives next to the tool - but for now it decreases the size of the repository ahead of a potential move to github.
2015-02-09 21:43:42 -05:00
John Chilton 7b5e5c6eec Refactor toward supporting multiple test data resolver types. 2015-02-09 21:43:42 -05:00
John Chilton da67d35e60 Allow GALAXY_TEST_FILE_DIR to a comma-separate list. 2015-02-09 21:43:42 -05:00
JenCabral d0dedc8404 adding a comment and moving out of else statement 2015-02-06 11:05:04 -06:00
JenCabral ee3fe10503 checks to see if directory for database exists if not creates the directory 2015-02-06 10:59:53 -06:00
John Chilton 937a9eeef8 Fix unit tests for ddbe0d1. 2015-02-03 20:09:46 -05:00
Carl Eberhard 25855d1406 Browser test: use new object param style in history api tests 2015-02-03 16:54:39 -05:00
Carl Eberhard 14383c0868 API, tests: add datasets API tests in test/API and casperjs sections; Browser tests: add datasets api, allow api to send extra params for history show & index 2015-02-03 16:11:10 -05:00
John Chilton 25e1517f37 Drop test that is failing due to improved HDA accessibility consistency. 2015-02-03 12:20:41 -05:00
John Chilton b56bd85b6a Expose $__tool_directory__ to tools.
Repeatedly one wants to do things like create symbolic links and then call a helper script - the 'interpreter' tag doesn't allow shell commands before calling a helper script so they could not be used in this fashion. The previous pattern for doing this was then to use the ToolShed only 'set_environment' requirement tag. These were onerous to setup and the resulting tools were no longer portable to non-ToolShed installed contexts - I believe this variant is more robust and elegant.

More information https://trello.com/c/0pgF5PBQ and here https://trello.com/c/XK5SqE1i.
2015-02-03 10:29:34 -05:00
Carl Eberhard 2c21d5252f Browser tests: remove starting slash from workflow return url comparisons 2015-02-03 09:00:51 -05:00
John Chilton 2f15eb0d78 Expose improved sample tracking to tools for implicit map/reduce ops.
Tools may now use $input.element_identifier during tool evalution for input 'data' parameters with the following semantics:

 - If the input was specified as a single dataset by the user - this just fallbacks to providing the $input.name.
 - If the input was mapped over a collection (to produce many jobs) or if the input is a 'multiple="true"' input that was provided a collection - the $input.element_identifier will be the element identifier for the corresponding collection item (generally much more useful the dataset name - since if preserved throughout workflows).

'data_collection' parameters already can access this kind of information - but it is something of a best practice to use simple 'data' parameters since they are compatible with more traditional un-collected datasets.

This commit really needs more comments - but Philip Mabon has been patiently waiting for this functionality for a long time.
2015-02-02 16:29:42 -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
Carl Eberhard 768f37ff37 Managers: add a 'user_manager' in BaseController; History: allow 'history/share' to accept user ids, add browser tests for same; Browser tests: make api urls absolute and so usable in web-based tests 2015-01-30 16:35:12 -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
John Chilton 4939c45e3d Test cases for select validation handling.
Normal selects seem to be prevented from execution with invalid parameter values, but not columns. Values are escaped properly so shell exploitation isn't the problem - but as a usability thing Galaxy should prevent execution and provide a warning message.
2015-01-27 12:14:56 -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 08ab0c6376 A simpler way to configure output pairs (exploiting static structure).
See example and comments in test/functional/tools/collection_creates_pair_from_type.xml.
2015-01-15 09:30:00 -05:00
John Chilton 2cb7c8d73e More configurable format and metadata handling for output collections.
Imporvements to testing code.
2015-01-15 09:30:00 -05:00
John Chilton 4c5c8a47db Allow tools to output collections with a dynamic number of datasets.
Models:

Track whether dataset collections have been populated yet.

Dataset collections are still effectively immutable once populated - but dynamic output collections require them to be sort of like `final` fields in Java (analogy courtesy of JJ) - allowing them to be declared before they are initialized or populated. This is tracked by the `populated_state` field.

Tools:

Output collections can now describe `discover_datasets` elements just like datasets - except in this case instead of dynamically populating new datasets in the history - they will comprise the collection. `designation` has been reused to serve as the element_identifier for the collection element corresponding to the dataset.

See Pull Request 356 for more information on the discover_datasets tag https://bitbucket.org/galaxy/galaxy-central/pull-request/356/enhancements-for-runtime-discovered.

Workflows:

Update workflow execution and recovery for dynamic output collections.

Galaxy workflow data flow before collections

* - * - * - * - * - *

Galaxy worfklow data flow after collections (iteration 1)

* - * - * \
           * - * - *
* - * - * /         \
                     * - * - *
* - * - * \         /
           * - * - *
* - * - * /

Galaxy worfklow data flow after this commit

              / * - * \
         * - *         * - *
        /     \ * - * /     \
       /                     \
      /                       \
     /        / * - * \        \
* - * -- * - *         * - * -- * - *
     \        \ * - * /        /
      \                       /
       \                     /
        \     / * - * \     /
         * - *         * - *
              \ * - * /
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
John Chilton 20519095b4 Remove unused load_cookies function in TwillTestCase. 2015-01-14 21:03:12 -05:00
John Chilton 65083bd97b Remove unused method tool_shed_util...
... it has a PEP-8 detected bug (undefined reference) so it would fail even if it was used.
2015-01-14 21:03:12 -05:00
John Chilton 6f115a7d5c PEP-8 fixes for install_and_test scripts. 2015-01-14 21:03:12 -05:00
John Chilton ba03cf898d Remove unused references to test-data stuff in i+t framework. 2015-01-14 21:03:12 -05:00
Carl Eberhard 91feab47e7 Fix to 14796ac: for history-panel-tests.js 2015-01-14 17:31:05 -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