Commit Graph
1283 Commits
Author SHA1 Message Date
John Chilton 3c4e100b13 Overhaul multi-run and collection multi-run tool API jobs.
Adding consistency allowing each parameter to be wrapped in a object describing the meta-properties of the submitting value - this was requested by Sam to make the new tool form easier to manage, it makes multi-running properties work for non-data parameters, and allows linked/unlinked specification of parameters.
2014-09-16 11:57:48 -04:00
John Chilton f4ea8b0f56 Allow sending singleton lists of datasets to single dataset parameters via API tool submission.
Request from Sam.
2014-09-16 11:57:48 -04:00
John Chilton 7a64e09a54 Fix testing helper bug I introduced with recent workflow testing work. 2014-09-16 11:14:27 -04:00
Nate Coraor 2469b7513b Fix unit tests I broke. 2014-09-16 10:13:08 -04:00
Nate Coraor 8fadc6392b Rename universe_wsgi.ini -> galaxy.ini everywhere. 2014-09-15 16:43:51 -04:00
John Chilton 30e44896be Better OOP design for separation between input and input collection modules.
(Lot easier now that I understand what all of the module methods are doing and have an example of a 4th module downstream.) Now with even more unit tests.
2014-09-12 09:32:22 -04:00
John Chilton 5f6e5bd5e9 More workflow module documentation improvements.
I nearly understand workflow modules...
2014-09-12 09:32:22 -04:00
John Chilton f2735a693d Work on workflow module testing. 2014-09-11 16:01:08 -04:00
John Chilton 4cbc33af09 API functional test for workflow 'replacement_params' and PJA renaming. 2014-09-10 11:51:10 -04:00
John Chilton 21f4d49a9e Synchronize validation of workflows between web and API controllers.
Reduces code duplication and does more correct checking of workflow step replacement parameters. More parameter checking functional tests.
2014-09-10 11:51:10 -04:00
Dannon Baker 2b04823343 Merge json changes (and some cleanup) back with central. 2014-09-09 16:31:31 -04:00
Dannon Baker 2327f0d946 Final to_json_string/from_json_string elimination in tests. 2014-09-09 10:12:40 -04:00
Carl Eberhard 12c03b57f4 Fix to b0c8da2: fix collapse call to curr panel in options; Browser tests: fix history selectors, misc. fixes 2014-09-09 10:09:06 -04:00
John Chilton c5511cd747 Add very basic functional tests for tool param validation.
Including same test with workflow parameter substition - gotta admit I thought that workflow test was going to fail - so this week is looking pretty good :).
2014-09-08 10:33:54 -04:00
John Chilton 9f1ab0bc2b Refactoring out methods usable for downstream work on scheduling. 2014-09-05 18:55:21 -04:00
John Chilton ac2c46029a Update workflow invocation to_dict for recent collection workflow changes.
There may now be multiple WorkflowInvocationSteps for each WorkflowStep for steps that are mapped over collections - so to_dict creating a dictionary of this information indexed on order step is problematic because only one WorkflowInvocationStep will be represented per step. Instead now just returning a big list of all of the invocations - which contains all of the same information. This is a backward incompatible API change for the workflow invocation API.

Also update the input mapping stuff with logic for dealing with data collection inputs.
2014-09-05 18:55:21 -04:00
John Chilton 342b7b7117 Tighten permissions for workflow invocations.
Sharing a workflow with a user was previously sufficient to grant access to all invocations of that workflow. This isn't a huge problem since the information potentially leaking out was limitted to invocation counts, various encoded ids, and update times. Still I think no information about invocations should be avaialble as a result of sharing a workflow - and upcoming changes to Galaxy will result in much more information being made available via the workflow invocation API.
2014-09-05 18:55:21 -04:00
John Chilton abf4005749 Add another example tool - to illustrate three ways to collect files for concatenation. 2014-09-05 15:19:18 -04:00
John Chilton b21bb6f2ad More discovered dataset testing tweaks. 2014-09-05 15:19:18 -04:00
John Chilton e58d1d9c8a Remove abstraction around requests now that it is a required dependency. 2014-09-04 20:34:52 -04:00
Carl Eberhard 2f003dc27f merge central 2014-09-03 15:19:09 -04:00
Carl Eberhard 3ef4691ea5 Fix bunch import; fix unit test imports 2014-09-03 15:18:55 -04:00
John Chilton c955e41867 Fill out tool test for configured discovered datasets.
Add new example based on Anton's bamtools split work and label all the outputs as visible - this should likely be the default but until it is might as well demonstrate them as visible since that is how they are most useful.
2014-09-03 15:17:49 -04:00
John Chilton 4c572245e6 Fix workflow rendering unit test when run in suite.
It was stubbing out connection stuff which worked fine when running test on its own - but after any test sets up the sql alchemy mappings this breaks down because events are trying to fire. This just uses actual model classes - which is just as easy anyway really.
2014-09-03 08:43:25 -04:00
John Chilton e1c0d419fd Delete incorrect unit test added in d15f9a1.
Don't know what I was thinking - it doesn't look like that method ever had that behavior.
2014-09-03 08:43:25 -04:00
John Chilton c87002961f Fix unit tests broken with 9f63d96. 2014-09-03 08:43:25 -04:00
John Chilton d8457bb7ee Unit tests for tool action code determining output formats.
With refactoring to reduce cyclomatic complexity. Also renaming 'input_ext' what it actually is 'random_input_ext'. We should fix that or at least issue a huge warning if we detect 'input' could have reasonable been different things.
2014-09-03 08:43:25 -04:00
John Chilton 6515dc274d Unit test for galaxy.tools.action to ensure all datasets get same object store id.
Enables subsequent refactoring.
2014-09-03 08:43:25 -04:00
John Chilton c1ee4c9b31 Add functional test tool demonstrating output filters.
Add new 'expect_num_outputs' attribute to 'test' element in tool XML to verify the produced number - needed to test output filtering.
2014-09-03 08:43:25 -04:00
John Chilton fcce8b8218 Add functional test tool demonstrating setting output dataset formats.
Directly setting format attribute, setting to format to 'input' (ambigious, non-deterministic and should be deprecated IMO), using format_source, and using change_format actions.
2014-09-03 08:43:25 -04:00
John Chilton db07824a12 Add functional test tool demonstrating special parameters.
:(
2014-09-03 08:43:25 -04:00
John Chilton ef1877b468 Small tweaks to some functional test tools.
Add data labels so the tools works in the workflow editor and added a conditional switches to some with collection params and multiple input data parameters to test some state-y logic in workflow editor.
2014-09-03 08:43:25 -04:00
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