Commit Graph
278 Commits
Author SHA1 Message Date
Nicola Soranzo 9805294f97 Revert "Revert "[WIP] Mega flake8 linting""
This reverts commit 37f1976d38.
2015-07-12 21:25:44 +01:00
Dannon Baker 37f1976d38 Revert "[WIP] Mega flake8 linting" 2015-07-11 13:17:38 -04:00
Bjoern Gruening ad8175928d lint fixes for /test/unit/ 2015-07-05 19:50:35 +01:00
Eric Rasche f090fb80b0 Merge pull request #395 from jmchilton/tool_env_vars
Allow environment variable definitions in tool XML.
2015-06-24 09:16:53 -05:00
John Chilton 3784fece91 Allow environment variable definitions in tool XML.
An ``<environment_variables>`` top-level XML block can be used to define these.

```
<environment_variables>
    <environment_variable name="FOO">$bar</environment_variable>
    <environment_variable name="FOO2">$bar2</environment_variable
</environment_variables>
```

The expressions are contained in the text of the block.

Implementation Detials:

In order to avoid odd shell expression stuff - the evaluated expressions are written to files and environment variables are read from these files at runtime.

Testing:

A demo tool ``test/functional/tools/environment_variables.xml`` with a test case that can be executed with the following expression.

```
./run_tests.sh -framework -id environment_variables
```
2015-06-23 20:27:07 -04:00
John Chilton 8ac5eb98a5 PEP-8 fixes for entire test/unit/tools module.
Add the module to .ci/pep8_sources.txt.
2015-06-23 20:07:27 -04:00
John Chilton f90e2e12f6 Fix stray print noticed by @nsoranzo.
And add that file to pep8 sources.
2015-06-22 14:41:53 -04:00
John Chilton a5a474fd40 Add example and test case for job configuration expansion.
First suggestion by @nsoranzo and second was easy once example was added to advanced config.
2015-06-22 13:09:23 -04:00
John Chilton 654ffe97ea Update out-dated comment in test_tool_loader. 2015-06-22 10:25:43 -04:00
John Chilton 711d4bb2c5 Modify XML macro parameters to allow arbitrary wrap string.
Previously there were two hard-coded toke types at_tokens an dollar_tokens. Now all tokens for the same macro must have the same wrap string and this string can be set arbitrarily with token_quote attribute. The defualt token_quote value is @.
2015-06-18 14:39:57 -04:00
John Chilton 1de2d73f38 Allow parameterization of XML macros.
This comes in two modes - simple lists of required attributes and per-attribute parameters that may specify defaults.

The following toy example:

```
<tool>
    <expand macro="inputs" bar="hello" />
    <macros>
        <xml name="inputs" dollar_tokens="bar">
            <inputs type="the type is $BAR$" />
        </xml>
    </macros>
</tool>
```

will evalute to ``<tool><inputs type="the type is hello" /><tool>``. The XML macro definition tag can now take in two new fixed attributes dollar_tokens and at_tokens - which will be interpreted as a list of parameter names. Each parameter can be specified when expanding the macros as simple attributes specifying the value of the parameter. The "dollar" parameter with name bar would map to a token with name $BAR$. Likewise an "at" parameter with name foo would map to a token with name @FOO@.

Both parameter types can be specified on a per-parameter basis to also specify default values. So the following example:

```
<tool>
    <expand macro="inputs" foo="hello" />
    <expand macro="inputs" foo="world" />
    <expand macro="inputs" />
    <macros>
        <xml name="inputs" at_token_foo="the_default">
            <inputs>@FOO@</inputs>
        </xml>
    </macros>
</tool>
```

Would evalute to ``<tool><inputs>hello</inputs><inputs>world</inputs><inputs>the_default</inputs>``.

Updated unit tests explain the above much more succinctly - though some like English and words for reasons that escape me.
2015-06-18 14:35:33 -04:00
John Chilton 732abcc0db Merge remote-tracking branch 'jmchilton/release_15.05' into dev 2015-06-08 14:04:28 -04:00
Carl Eberhard 5097a9300a [15.05] API, HDAs/Datasets: re-add file_name to detailed serialization for admin users (resolve #313) 2015-06-05 11:45:58 -04:00
Bjoern Gruening 4268a7ee57 fix unit test 2015-06-02 14:52:40 +02:00
Nate Coraor 656d9bef50 Merge remote-tracking branch 'upstream/release_15.05' into dev
Conflicts:
	lib/galaxy/version.py
2015-05-14 11:11:46 -04:00
Carl Eberhard d1c14bd1a1 Histories, API: do not consider deleted datasets when calculating history state; test 2015-05-12 16:57:17 -04:00
Carl Eberhard d675a6a0b3 Testing: use unittest2 to allow 2.7 assertions 2015-05-07 17:50:56 -04:00
Martin Cech d28ea45556 Merge branch 'release_15.05' into dev
Conflicts:
	config/plugins/visualizations/common/templates/script_entry_point.mako
2015-05-07 13:09:24 -04:00
Nate Coraor 74527e2031 Merge remote-tracking branch 'upstream/release_15.05' into dev 2015-05-06 15:25:47 -04:00
John Chilton 04bc0b2111 Fix assertions in test_VisualizationsRegistry.py...
...that were implicitly assumed fixed Python hashing.
2015-05-06 14:12:25 -04:00
John Chilton bc48ac15d5 Update tool tests to reflect get_tool is non-deterministic...
... if supplied a short id instead of a GUID and there are multiple versions of a shed tool with the same short id installed.
2015-05-06 14:06:16 -04:00
John Chilton 499108432a Attempt to fix manager, viz, and web unit tests for Python 2.6...
... using unittest2.
2015-05-06 14:06:16 -04:00
guerler f0f2f397ff Fix test cases 2015-05-06 09:26:37 -04:00
Carl Eberhard 7fd6cc3704 Visualization registry: move tests into directory matching lib/galaxy/visualization/plugins 2015-04-29 13:46:51 -04:00
Carl Eberhard 41abb7d000 Visualization registry: expand plugin testing 2015-04-29 13:40:57 -04:00
Carl Eberhard af1f9db527 Visualizations registry: a bit more shuffling between methods and between plugins and the visualization controller 2015-04-29 11:53:05 -04:00
Carl Eberhard dab23a747c Visualizations Registry: fix broken test that was sending mock template py files to the actual template cache dir 2015-04-28 16:05:25 -04:00
Carl Eberhard ed36e625bb Visualizations registry: refactor the relationship between plugins, the visualization controller, rendering, and rendering saved visualizations, minor fixes; Extend testing; Scatterplot: fix baseUrl resolution when used in own window 2015-04-28 15:41:01 -04:00
Carl Eberhard 1cf6e64abf Visualization registry: update test so that mako caching occurs in the proper place 2015-04-27 10:57:42 -04:00
Carl Eberhard d14aba2408 Visualizations registry: test script entry point; minor cleanup 2015-04-24 16:53:30 -04:00
Carl Eberhard 17e10683b8 Visualizations registry: refactor registry/pluginframework, and promote plugins to class 2015-04-22 15:37:06 -04:00
Carl Eberhard ca2598c97d Interactive environments: move InteractiveEnviornmentRequest to registry.py (since we branch on intenv code there anyway) from pluginframework.py; Add tests for intenv within visreg 2015-04-20 11:17:52 -04:00
Carl Eberhard f93961c497 Merge testing 2015-04-16 11:09:11 -04:00
Carl Eberhard 5ebe04cfd0 Testing: fix failing unit tests that were recently added 2015-04-16 10:45:24 -04:00
Carl Eberhard 1bc86a5fba Testing: move managers, web/base, datatypes/dataproviders, and visualization 'unit'(?) tests to using common mock objects and loading system; cleanup 2015-04-16 10:25:34 -04:00
Dannon Baker 1f90dfd86a Merge pull request #115 from guerler/revise_validation
Revise late validation of tool parameters
2015-04-16 09:58:14 -04:00
Dannon Baker 4ee3396793 Merge pull request #119 from jmchilton/toolbox_auth
Stronger toolbox filtering.
2015-04-15 17:28:33 -04:00
guerler c9d5a14304 Adjust late validation test cases 2015-04-15 15:41:03 -04:00
John Chilton afcf899f13 Stronger toolbox filtering.
- Update toolbox filtering rules to also filter on tool.allow_user_access.
 - Use toolbox filtering when listing tools not in the context of panel (so filtered tools are not returned from the API).

See also:

 - https://trello.com/c/jyl0cvFP
 - https://trello.com/c/Sg8D2PBj
 - http://dev.list.galaxyproject.org/Bug-Toolbox-filters-not-applied-in-workflows-td4662879.html

Testing:

The following command will run a superset of relevant tests:

    ./run_tests.sh -u test/unit/tools
2015-04-15 14:40:50 -04:00
John Chilton 0fe2b601ce Implement detect_errors attribute on XML.
If present, it can be one of

 - "default", no-op fallback to stdio tags and erroring on standard error output.
 - "exit_code", error if tool exit code is not 0. (The @jmchilton recommendation).
 - "aggressive", error if tool exit code is not 0 or either Exception: or Error: appears in standard error/output. (The @bgruening recommendation).

Refactoring and unit/functional tests to support and demonstrate this.

Run functional test with:

    ./run_tests.sh -framework -id detect_errors_aggressive

Run relevant unit tests:

    nosetests test/unit/tools/test_parsing.py

Updated from original version to reflect comments on pull request #117 - in particular the ``detect_errors`` tag was moved from ``tool`` to ``command``.
2015-04-15 12:38:35 -04:00
Carl Eberhard 179d11db85 Merge managers.datasets with dev and remove conflicts 2015-04-02 14:39:45 -04:00
Carl Eberhard c1f721086f Managers: attempt to extract trans from de/serializers 2015-04-02 13:49:03 -04:00
Carl Eberhard fafea361ac Managers: remove trans param as much as possible (this results in some clunky use of current_history kwarg) 2015-04-01 15:21:25 -04:00
Carl Eberhard f8c6725c42 Managers, filters: allow remapping of attribute keys; expand tests 2015-03-31 15:35:17 -04:00
Carl Eberhard 9f1be65937 Managers: re-add dataset assoc job methods, move primary id serialization into base serializer, minor fixes and refactoring, expand tests 2015-03-31 11:15:49 -04:00
Carl Eberhard 188ff0076f Managers, Users: corrections and refactoring, expansion of tests 2015-03-30 18:00:13 -04:00
Carl Eberhard c3f30fbdc5 Managers: refactor hda manager into dataset/dataset assoc/etc., begin to expand rbac security for datasets, expand tests 2015-03-29 19:58:12 -04:00
John Chilton 3813429f7e Refactor tool status check objects into parse module.
Part of ongoing effort to isolate the galaxy.tools.parser and not have it depend on things in galaxy.tools outside that module.
2015-03-25 14:43:53 -04:00
Nate Coraor d242286187 Fix unit test broken by set_metadata changes. 2015-03-05 09:55:11 -05:00
John Chilton 7c9818c24a Fix unit tests for dde2fc9572.
Thanks to @ dannon for the bug report.
2015-02-24 12:02:39 -05:00