Commit Graph
1251 Commits
Author SHA1 Message Date
John Chilton 6d727ce454 Merge stable. 2014-09-02 16:41:48 -04:00
Carl Eberhard a96e50b9a3 Test fixes for 5ce55f9; correct spaceghost.stderr to use system.stderr (thanks, John); correct api-workflow-tests (which I completely forgot *I* had made) and add test-data 2014-09-02 15:35:56 -04:00
John Chilton e7b0801f8d Small improvements to JavaScript testing with run_tests.sh.
Add new -j|--casperjs option to run through the casperjs test suite. Ensure grunt is on path before attempting to run qunit tests. A more useful version of this changeset which automatically installed phantomjs, casperjs, grunt, and npm as needed and added the required tools to the tester's path (https://bitbucket.org/jmchilton/galaxy-central-fork-1/commits/0919fc9403933f88e458724b95b0d213117bbd0e) proved unpopular because of implementation details - see conversation here https://bitbucket.org/galaxy/galaxy-central/pull-request/461/remove-deprecated-test-scripts-improved/diff.
2014-09-02 12:35:33 -04:00
John Chilton 8fb1a04b8e Fixup comments and add README for test/casperjs directory. 2014-09-02 11:50:43 -04:00
John Chilton 24e914f57b Fix workflow editor bug related state updates for collections attached to multiple input data parameters.
Detail bug report from Michael Crusoe here : https://trello.com/c/0mdGCx4P.

This also fixes a test case added in 289e48b which was both attempting to assert something wrong and was incorrectly implemented. Augmenting the workflow editor test suite with some actually valid test cases that assert the correct behaviors.

For a longer explaination - workflow input terminals have two related concepts 'canAccept' and 'attachable'. An output terminal is 'attachable' if in the abstract it could be attached to the input regardless of whether the input is already filled or not. 'canAccept' is more stateful in that an output terminal is 'canAccept'able if the input terminal is not filled ('_inputFilled') and it is 'attachable'.

So - the problem was 'attachable' was not correctly defined for a multiple input data parameters. 'attachable' was asserting that any connected input terminal could not be 'attachable' by an collection output terminal - so on these asynchronous node state changes collections attached to multiple input data parameters were being wiped out. The more percise/correct distinction is that if a multiple input data parameter has single inputs connected to it - it cannot also have a collection connected to it (yet anyway). This fixes the mentioned bug.

The problematic test case was conflating 'attachable' and 'canAccept'able - I have fixed the test case to verify the correct 'attachable' logic and added newer, higher level test cases to test the canAccept logic and the actual behavior the end user would observe (of the connector being destroy).
2014-09-02 11:20:44 -04:00
John Chilton 7543a567f2 Add workflow test demonstrating failure when multiple lists with different identifiers are using in workflows. 2014-08-27 16:32:26 -04:00
John Chilton 9b4ca59ff2 Remove workflow test that accidently depended on tool not in -central.
Opps.
2014-08-27 16:32:26 -04:00
John Chilton 401fad5e25 Add some more basic test tools for building simple workflows for testing. 2014-08-27 16:32:26 -04:00
John Chilton 565580a564 Update readme for functional test tools directory. 2014-08-27 16:32:26 -04:00
John Chilton 4dcfe4c561 Some very basic unit tests and docs for workflow modules.
Just a start - I need to keep going with this and test and document all methods.
2014-08-26 10:02:49 -04:00
John Chilton 0b43aa3847 Improvements to API import/export test case.
Actually do some verification of imported history, eliminiate use of deprecated mixin, timeout operations that 'wait', break up big function and name test better.
2014-08-24 19:37:33 -04:00
Dannon Baker 1417d967f2 Merged in jmchilton/galaxy-central-fork-1 (pull request #465)
Dynamic destination enhancements aimed at enabling co-locating data and (cloud) bursting.
2014-08-18 15:05:18 -04:00
John Chilton a5a13547cd Extract some mixin's out of trans allowing trans-like functionilty outside web threads...
In particular break out mixins defining context-based utilities for interacting with app, an user, and a history. In downstream work on workflow scheduling this proves nessecary and sufficient to create an context for 'execute'-ing tools (create jobs) outside of web threads in response to workflow requests.

Unit tests for some of this.
2014-08-18 10:28:40 -04:00
John Chilton b0673d1dd2 Dynamic destinations - easier, high-level reasoning about bursting.
Add utility to RuleHelper to simplify bursting reasoning slightly, setup a stock rule for bursting between two static job destinations - mostly for demonstration purprose but it might be useful in some settings.
2014-08-17 18:43:54 -04:00
John Chilton a497fb8467 Dynamic destinations - easier, high-level reasoning about data locality.
... if only in a limitted sort of way. Provide ability to hash jobs by history, workflow, user, etc... and choose among various destinations semi-randomly based on that to distribute work across destinations based on these factors.

Add a stock rule as in the form of a new dynamic destination type ("choose_one") that demonstrate using this to quickly proxy to some fixed static destinations. Add examples to job_conf.xml.sample_advanced.
2014-08-17 18:43:54 -04:00
John Chilton f9be760b28 Dynamic destinations - allow dispatching on workflow invocation.
Generate a workflow invocation UUID that is stored with each job in the workflow and allow dynamic job destinations to consume these. Should allow for grouping jobs from the same workflow together during resource allocation (a sort of first attempt at dealing with data locality in workflows).
2014-08-17 18:43:54 -04:00
John Chilton fbe27016f7 Dynamic destinations - pass job_conf.xml params to rule functions.
In other words, send extra job destination parameters to dynamic rule functions as arguments (in addition to those dynamically populated by Galaxy itself). This enables greater parameterization of rule functions and should lead to cleaner separation of logic and data (i.e. sites can program rules that restrict access to users, but which users can be populated at a higher level in `job_conf.xml`).

For example the following dynamic job rule:

    def cluster1(app, memory="4096", cores="1", hours="48"):
        native_spec = "--time=%s:00:00 --nodes=1 --ntasks=%s --mem=%s" % ( hours, cores, memory )
        return JobDestination( "cluster1", params=dict( native_specification=native_spec ) )

Could then be called with various parameters in job_conf.xml as follows:

    <destination id="short_job" type="dyanmic">
      <param id="function">cluster1</param>
      <param id="hours">1</param>
    </destination>

    <destination id="big_job" type="dynamic">
      <param id="function">cluster1</param>
      <param id="cores">8</param>
      <param id="memory">32768</param>
    </destination>
2014-08-17 18:43:54 -04:00
John Chilton 56566a2dbe Dynamic destinations - extend RuleHelper for reasoning about groups of destinations...
If multiple destinations map to the same underlying resource (a very typical case), this could allow rule developer to reason about cluster as a whole - though perhaps clunkily - by supplying all destination ids mapping to that cluster.
2014-08-17 18:43:54 -04:00
John Chilton c7e717c527 Improved error handling for dynamic job destinations.
More and more verbose error messages with updated terminology and error conditions unit tested.
2014-08-17 16:38:34 -04:00
John Chilton 33bcfa173a Job mapping unit tests.
A bunch of unit tests for galaxy.jobs.mapper and galaxy.jobs.rule_helper testing various aspects of static and dynamic job mapping and the utility class (RuleHelper) that can be supplied to dynamic job rules.
2014-08-17 16:38:34 -04:00
John Chilton 1909516474 Add unit test to merely walk through new workflow render module...
...small fix found by test.
2014-08-13 21:36:10 -04:00
Carl Eberhard f176ac0ee2 QA, qunit: update HDA, history contents tests 2014-08-12 12:48:28 -04:00
Carl Eberhard 39aa86e36d QA, casperjs: fix selectors changed in 7005608 2014-08-12 11:42:03 -04:00
John Chilton ec34167345 Fix multi-page tool help parsing.
Patch thanks to Hans-Philipp Brachvogel.
2014-08-12 08:19:04 -04:00
John Chilton 95d62d7c73 Normalize workflow input dataset dict earlier...
... this will allow linking to actual steps (referential integrity) if/when we store workflow requests in the database and failing faster.

Also more unit tests.
2014-08-10 14:05:31 -04:00
John Chilton adfc7cec81 Normalize workflow step parameters earlier...
... this will allow linking to actual steps (referential integrity) if/when we store workflow requests in the database.

Also unit tests.
2014-08-10 14:05:31 -04:00
John Chilton 88eecd3c6a Fix failing test test/unit/workflows/test_extract_summary.py. 2014-08-10 14:05:31 -04:00
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 64915e9716 Merge next-stable. 2014-08-04 15:02:01 -04:00
John Chilton fe0c53c930 Fix new Tool.get_externally_referenced_paths to find imported macro files.
Should fix this bug https://trello.com/c/TeguDYSq discovered by Bjoern... on stage at the GCC.
2014-08-04 12:18:00 -04:00
John Chilton daaf2c8cf0 Restructure tool external file logic in load_tool_from_tmp_config in ToolValidator...
... so internals of tool XML description are only utilized in the galaxy.tools module (and submodules). Add some unit tests for this new method for finding externally referenced files.
2014-08-04 12:18:00 -04:00
John Chilton c85d14f7a1 Cleanup test case in e7ba2469bca0cb7a1d5a8d754885537dc683d490. 2014-08-04 09:38:05 -04:00
John Chilton 8f2434e2ca Merge next-stable. 2014-08-04 09:34:07 -04:00
John Chilton ac91ae8419 Ensure topological sorting is 'stable' w.r.t to first element of tuple.
This improves correctness of 64a25838085978c250a0486b516bb2c8e7c3b850.
2014-08-04 09:33:40 -04:00
John Chilton 7fdcf1b462 Test cases and test workflows to verify workflow import stability. 2014-08-04 09:33:40 -04:00
Ira Cooke d2c4af3e0a Merged galaxy/galaxy-central into default 2014-07-31 09:58:21 +10: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 10fd2279ee Fix some basic citation unit tests missing from PR #440. 2014-07-28 19:18:40 -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 ebe93b1673 Merged in jmchilton/galaxy-central-fork-1 (pull request #440)
Initial BibTeX/DOI citation support in tools and histories.
2014-07-28 13:15:32 -04:00
Nate Coraor dfc08662cc Remove hardcoded path to builds.txt from util, fix unit test that relies on this. 2014-07-27 02:59:24 -04:00
Ira Cooke add894400e Merged galaxy/galaxy-central into default 2014-07-25 11:06:45 +10:00
Ira Cooke b751b8aa1a Better sqlite query whitelisting via the sqlparse library 2014-07-25 11:02:53 +10:00
John Chilton 9150a884aa Bugfix in test tool demoing two collection params.
Bit problematic functional tests passed despite this bug.
2014-07-24 15:30:51 -05:00
John Chilton 78fc3c9850 Add functional tool tests exercising multiple collection parameters at once. 2014-07-24 15:06:04 -05:00
John Chilton ba04c4ab9a More collection-y state update tests. 2014-07-24 14:30:11 -05:00