Commit Graph
495 Commits
Author SHA1 Message Date
Dave Bouvier bb3c895e51 Add optional display of stdout/stderr to the jobs API return value, defaulting to not displayed. Rework the test API interactor to wait for jobs instead of histories and get the stdout and stderr from the API. 2014-10-23 10:34:17 -04:00
John Chilton d57088409c Fix data column parameters pointed at multiple data parameters.
Before it would just die with an unhelpful server side exception - now it attempts to build, validate, and use a useful set of columns.
2014-09-26 10:49:43 -04:00
John Chilton 6ff787d769 More tool functional tests for validation stuff.
Test default sanitization in repeat. Basic test of simpler santizer and mapping.
2014-09-16 21:29:10 -04:00
Nate Coraor 8fadc6392b Rename universe_wsgi.ini -> galaxy.ini everywhere. 2014-09-15 16:43:51 -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 2327f0d946 Final to_json_string/from_json_string elimination in tests. 2014-09-09 10:12:40 -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 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 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 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 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 ec34167345 Fix multi-page tool help parsing.
Patch thanks to Hans-Philipp Brachvogel.
2014-08-12 08:19:04 -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 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
John Chilton cb9fc095fc Initial BibTeX/DOI citation support in tools and histories.
Allow tool authors to specify citations using a DOI or BibTeX. BibTeX can be specified either by pointing at a BibTeX file in the tool directory or by embedding bibtex entries right in tool citation blocks. If referencing a file parallel to the tool, the file should contain only a single BibTeX entry, this restriction can be easily lifted by adding a BibTeX parser as a Python dependency for Galaxy - but I do not have permission to do this.

These citations will appear at the bottom of the tool form in a formatted way but the user will have to option to select RAW BibTeX for copying and pasting. Likewise, the history menu now has an option allowing users to aggregatesuch citations across an analysis a comparable list of citations.

UI interactions are implemented using a Backbone model and view and data is fetched from the Galaxy server as BibTeX using the API. Two API entry points have been added - one to fetch the BibTeX entries for a tool and another for a history.

BibTeX entries for citations annotated with DOIs will be fetched from http://dx.doi.org/ and cached using Beaker.

Additional Limitations:

 - I am not super happy with a few different GUI elements of this. It is ugly and I didn't write the BibTeX parser but I did write the code that takes parsed BibTeX and converts it to a formatted entry. If merged, I will outline a Trello card to follow up and improve the UI and find some more standard way to build a formatted HTML citation from a parsed BibTeX entry.

 - BibTeX Limitations: LaTeX embedded in the BibTeX entries doesn't render properly when producing a "pretty" citation in the GUI (should still be exported to citation managers properly though). Cross references aren't supported at this time.

Alternative Implementations:

BibTex/DOI vs. PROV:

There was some discussion of PROV encoding citation information on the development mailing list. The citation tags on tools are typed so this could certainly be added - but it was discussed at the BOSC 2014 codefest and there was some conensus that tool authors are more likely to already have BibTeX or DOIs available for the tool's references and the major reference managers end users will likely plug these citations into while writing papers are more likely to be able to consume BibTeX than anything else.

The bench biologist using Galaxy is the consumer of this work I most concerned with - if we need to convert citations into other formats such as EndNote or Word's bibliography support there is a suite of tools we could optionally plug into Galaxy (http://sourceforge.net/p/bibutils/home/Bibutils/) to enable this down the road. PROV seems to have such an ecosystem to leverage - I could not even find a tool to convert it BibTeX.

Parse BibTeX Client vs Server:

As mentioned above it would be nice in some ways to be able to parse and reason about BibTeX on the backend - but it would require adding a new dependency to Python. Since we have to ship BibTeX to the browser anyway to allow users to copy and paste it - I decided it was easier to start with parsing and formatting BibTeX on the client side. I therefore added the following library BSD JavaScript dependency https://github.com/mayanklahiri/bib2json to enable this. I would be happy to revisit this decision and produce formatted entries server side - there seem to be more Python options for doing this than JavaScript.
2014-07-23 15:43:13 -05:00
Dave Bouvier c31644a5b1 Fix test_history_functions test 80, copying history items. 2014-07-09 16:11:50 -04:00
John Chilton 3020dcd037 Allow discovered datasets to use input data format in 'ext' definition. 2014-06-29 13:31:33 -05:00
John Chilton 3d9da261d1 Allow tool conf 'tool_path' resolution relative to conf file.
Relative 'tool_path' directories are resolved relative to GALAXY_ROOT (or really working directory). This is probably the expected behavior - but I think it is advantageous to be able to find tools relative to the tool_conf file also. This can now be done using string.Template resolution of ${tool_conf_dir}.
2014-06-23 16:32:24 -05:00
John Chilton 1c5691964e Implement optional collection params.
Was already parsing optional attribute but I put exactly zero thought into the implementation so these didn't work at all I don't think. This fills out the implementation, adds a test tool, and some cheetah helpers to facilitate this: "#if $collect_param" will fail if input not supplied or collection is empty and "#if $collect_param.is_input_supplied" will fail is input not supplied (i.e. empty collections will pass this check).
2014-07-25 10:28:50 -05: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 f2f21e2bed Allow tools and deployers to specify optional Docker-based dependency resolution.
Testing it out:
---------------

 - Install [docker](http://docker.io) (tough, but getting easier).
 - Copy `test/functional/tools/catDocker.xml` to somewhere in `tools/` and add to `tool_conf.xml`.
 - Add `<param id="docker_enabled">true</param>` to your favorite job destination.
 - Run the tool.

Description and Configuration:
------------------------------

Works with all stock job runners including remote jobs with the LWR.

Supports file system isolation allowing deployer to determine what paths are exposed to container and optionally allowing these to be read-only. They can be overridden or extended but defaults are provided that attempt to guess what should be read-only and what should be writable based on Galaxy's configuration and the job destination. Lots of details and discussion in job_conf.xml.sample_advanced.

`$GALAXY_SLOTS` (however it is configured for the given runner) is passed into the container at runtime and will be available.

Tools are allowed to explicitly annotate what container should be used to run the tool. I added in hooks to allow a more expansive approach where containers could be linked to requirements and resolved that way. To be clear, this is not implemented at all but the class ContainerRegistry is instantiated, passed the list of requirements, and given the chance to return a list of potential containers... if someone wants to implement this someday.

From a reproducibility stand-point it makes sense for tool author's to have control over which container is selected, but there is this security and isolation aspect to these enhancements as well. So there are some more advanced options that allow deployers (instead of tool authors) to decide which containers are selected for jobs. `docker_default_container_id` can be added to a destination to cause that container to be used for all un-mapped tools - which will result in every job on that destination being run in a docker container. If the deployer does not even trust those tools annotated with image ids - they can go a step further and set `docker_container_id_override` instead. This will likewise cause all jobs to run in a container - but the tool details themselves will be ignored and *EVERY* tool will use the specified container.

Additional advanced docker options are available to control memory, enable network access (disabled by default), where docker is found, if and how sudo is used, etc.... These are all documented in `job_conf.xml.sample_advanced`.

Implementation Details:
-----------------------

Metadata is set outside the container - so the container itself only needs to supply the underlying application and doesn't need to be configured with Galaxy for instance. Likewise - traditional `tool_dependency_dir` based dependency resolution is disabled when job is run in a container - for now it is assumed the container will supply these dependencies.

What's Next:
------------

If implementation is merged, much is left to be discussed and worked through - how to fetch and control what images are fetched (right now the code just assumes if you have docker enabled all referenced images are available), where to fetch images from, tool shed integration (host a tool shed docker repository?, services to build docker images preconfigured with tool shed depedencies?), etc.... This is meant as more of a foundation for the dependency resolution and job runner portions of this.
2014-06-07 01:45:05 -05:00
John Chilton e3fbe97116 Bugfix: More left/right -> forward/reverse fixes. 2014-05-27 12:52:41 -05:00
John Chilton 3e7b1b511a Bugfix: Hadn't implemented clean way to iterate of collection element names in tools.
Perhaps stretching the definition of bugfix here to get this in next-stable.
2014-05-27 12:52:41 -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
Dave Bouvier f4386d60ab Clean up twilltestcase.py, fix functional tests for tools with spaces in the tool ID. 2014-05-09 09:57:26 -04:00
John Chilton 3688e02475 Add framework test tool that has both data and data_collection param - with test case.
Tool test is mildly useful to verify this works for single execution - but more useful as basis for future changesets testing mixed collection and subcollection mapping tool executions.
2014-05-07 15:39:03 -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 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 f42d97fef3 Dataset collections - tool parameters - allow tool tests.
With example tool tests demonstrating some basic features available to cheetah for data_collection parameters.
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
John Chilton ddcad1582c Merged in jmchilton/galaxy-central-fork-1 (pull request #356)
Enhancements for Runtime Discovered (Collected Primary) Datasets
2014-05-06 08:13:29 -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
Dave Bouvier 2835b84a4c Fix admin and library feature functional tests. Improve handling of checkbox parameters and multi-select inputs in functional tests. 2014-04-29 15:39:43 -04:00
John Chilton 42955431c1 More refactoring of tools API test case. 2014-04-29 13:53:06 -05:00
Dave Bouvier d3987e9424 Fix sample tracking functional tests. 2014-04-29 13:21:28 -04:00
John Chilton 757342cdfb Tools API Improvements.
Ablity to require tool for API test. Fix test_index for tool panels containing tools outside a section.
2014-04-28 14:38:45 -05:00
John Chilton 3ac17e09f1 Rework test framework testing and tools.
-framework will still cause just a small set of non-default, non-user facing tools to be tested and exerise various aspects of the tool and test frameworks, but now an argument can be passed in -with_framework_test_tools to allow these tools to be used as part of the normal test framework (i.e. when not using -framework). This serves two purposes - to ensure the feature coverage of existing tests remains high as the tests are migrated out of the distribution and to allow a set of tests to be available for functional (e.g. API tests) that users don't need to see.
2014-04-28 11:48:51 -05:00
John Chilton 3f4b114e5c Tools API Tests - Refactor away from deprecated mixin toward DatasetPopulator class. 2014-04-26 17:52:08 -05:00
John Chilton 187171c74b Tools API Tests - Add another test with repeat.
Adding abstractions reused heavily in collections and multi-execution tests downstream.
2014-04-26 17:52:08 -05:00
Dave Bouvier 06c2434f6e Fix functional tests for library templates. 2014-04-25 10:41:53 -04:00
Dave Bouvier 83394adf1b Twill test framework cleanup. Fix functional tests for history functions. 2014-04-23 16:46:14 -04:00
Dave Bouvier b8981f4659 Fix library template functional tests. Revert change to user info tests that was breaking library template tests. 2014-04-22 12:58:42 -04:00
Dave Bouvier 5dab91f4ba Fix functional tests for history functions. 2014-04-21 15:42:22 -04:00