Commit Graph
607 Commits
Author SHA1 Message Date
John Chilton b402093479 format_source in workflow editor is too restrictive.
Case made well by @erasche on #1746, fixes #1746.

To resolve this more correctly (and many other potential type problems) - the workflow editor should be significantly reworked to track the datatype (or a range of datatypes) on each terminal (the way it does for collection mapping information). The change would be a weeks worth of development effort and inappropriate to apply to a release branch.
2016-02-23 17:16:27 +00:00
John Chilton eca2c3bcee Failing test case to exhibit #1514. 2016-01-19 13:50:53 +00:00
John Chilton e69638277f Fix tab problem in test tool.
dash will convert the literal characters \t to a tab, bash doesn't seem to do this. Use portable printf as suggested by nicola.
2016-01-14 06:17:45 +00:00
John Chilton cd32b91dc9 Update inputs_as_json.xml to drop version attribute.
Also add note about filename.
2015-12-30 11:24:01 +00:00
John Chilton de0c913b8b More work on converting tool inputs to json.
- Drop version requirement per commends by @bgruening.
 - Add examples for conditionals, repeats, sections, colors, and booleans specified truevalue/falsevalue.
 - Various bug fixes unearthed by new test cases.
2015-12-30 11:17:13 +00:00
John Chilton d5d404c912 Implement special config file to dump parameters as json.
```
    <configfiles>
        <inputs name="inputs" format="json" version="1" />
    </configfiles>
```

Version is specified as 1, because the Galaxy tool plumbing doesn't really distinguish between parameter is '', parameter was explicitly supplied as None, parameter was absent, etc... - everything is a just a string in some ways. This distinction may be more important with JSON and for instance the CWL will require more percision, so we may want to revise Galaxy's tool handling in a backward compatible way someday.
2015-12-29 15:09:49 +00:00
John Chilton 7269f76e6e Remove transiently failing maxseconds.xml framework test. 2015-12-26 12:37:17 +00:00
John Chilton cae457d8c1 Fail maxseconds test tool if sleep is interrupted. 2015-12-05 18:13:07 +00:00
Martin Cech 9a1fc647a3 Merge pull request #1212 from jmchilton/tool_opts_6
Smaller Tool Optimization PR
2015-12-03 16:23:41 -05:00
John Chilton 64b7cc9fef Add sample tool that creates 10 outputs. 2015-12-03 10:16:12 +00:00
Martin Cech ffb3de9ede Merge pull request #1153 from jmchilton/collection_type_source
Implement type_source on output collections.
2015-12-02 00:14:08 -05:00
Nicola Soranzo b6451d0be6 Fix bugs in test and code introduced in PR #1113. 2015-11-23 15:18:57 +00:00
Martin Cech 2e510bd5e1 Merge pull request #1113 from jmchilton/format_source_collection
Allow accessing collection elements in format_source.
2015-11-21 23:38:39 -05:00
Martin Cech ab0829f2e8 Merge pull request #1096 from jmchilton/format_2
Outline "Format 2" workflow definitions.
2015-11-20 22:05:42 -05:00
John Chilton 0c22d13889 Implement type_source on output collections.
Inherit collection_type from an input, the way metadata and format can be.

This commit includes a test tool demonstrating this functionality. The tool test for this tool can be executed using the following command:

```
./run_tests.sh -framework -id collection_type_source
```
2015-11-20 15:32:38 +00:00
Dannon Baker 96b17bd856 Merge pull request #1117 from jmchilton/input_hang
Don't let $input hang cheetah evaluation...
2015-11-19 17:18:57 -05:00
John Chilton b25b8c3f24 Revise and fix waiting for tool tests.
- maxseconds on test tag stopped being respected at some point, fix that.
- maxseconds on test tag stopped being parsed at some later point, fix that.
- Revise default behavior so it can be overridden with yet another testing environment variable GALAXY_TEST_DEFAULT_WAIT.
- Add test case to ensure there is no future regression of these behaviors.
2015-11-18 11:22:40 +00:00
John Chilton b4c77b7617 Introduce "Format 2" workflow definitions.
This is a slight tightening up of the ad-hoc, experimental workflow YAML definition used by the test framework (and by Kyle, but lets just admit Kyle is part of Galaxy's test framework).

This format is still defined entirely client side by transcoding the YAML or python object description into real (or format 1) Galaxy workflows - so these cannot realisticaly be declared part of Galaxy's public interface and can remain experimental and subject to change.

In addition to refactoring the code implementing these workflows for upstream modifications to explore new features, the format itself has been made slightly more stringent in two ways:

 - 'steps' must now be explicit (previously converted auto-convert list to dict).
 - Ensure the workflow declared a 'class' is defined and the class is 'GalaxyWorkflow'.

This will help with discovery of workflow objects with downstream tooling (planemo for workflows?) and brings the Galaxy definition slightly more inline with the CWL definition for workflows (very slightly).
2015-11-18 10:50:43 +00:00
John Chilton 7dedb3ff18 Add another cheetah syntax error example...
... ensure the test framework run the tool, detects that there is an error, and handles things appropriately.
2015-11-18 10:45:05 +00:00
John Chilton 0ff8a21891 Add example tools demonstrating cheetah problem (unbound variable).
Refine default override of input to raise an exception instead of just throwing in a dummy string.
2015-11-18 10:40:57 +00:00
John Chilton 312746d169 Allow accessing collection elements in format_source.
Can do it by numeric index or element name, e.g. input[0] or input["forward"]. Only works for 1-D collections.

Implements #699.

Run new and most relevant existing tests with the following commands:

```
nosetests test/unit/tools/test_actions.py
./run_tests.sh -framework -id output_format_collection
./run_tests.sh -framework -id output_format
```
2015-11-17 14:13:14 +00:00
John Chilton b3d5f80621 Improved unicode handling stdout/stderr/command_line. 2015-11-10 12:59:22 +00:00
Dannon Baker e423ab6246 Merge pull request #428 from natefoo/smash_eggs
Replace eggs with wheels
2015-10-22 18:44:35 -04:00
John Chilton 652bd0fc30 Support selections in interface dict rep of tools.
Expose and test through experimental YAML representation of tools. This doesn't represent official support of (vastly superior) YAML tools, this representation continues to serve as an easy way to exercise the abstract tool parsing interface.

Brings simple_constructs.yml and simple_constructs.xml further in line also.

Test:

    ./run_tests.sh -framework -id simple_constructs_y
2015-10-20 13:49:24 +01:00
Nate Coraor 433b79de2b Merge branch 'dev' of https://github.com/galaxyproject/galaxy into smash_eggs 2015-10-13 16:54:18 -04:00
John Chilton 5ff102507b Add regression test for issue in #798. 2015-09-25 14:29:05 +01:00
Nicola Soranzo ac8b5eae02 Fix errors when starting "./run_tests.sh -with_framework_test_tools -api" 2015-09-25 17:51:21 +01:00
John Chilton fa0c3a4bbc Implement failing workflow test case.
For galaxyproject/galaxy#776.
2015-09-24 15:40:52 +01:00
Nate Coraor f334764627 Egg cleaning in test/ 2015-09-22 10:32:16 -04:00
Nicola Soranzo 248ce3075b Merge pull request #765 from jmchilton/multi_min_max
Implement min/max for multiple data input parameters.
2015-09-22 14:52:47 +01:00
John Chilton 87d5063a0d Implement min/max for multiple data input parameters. 2015-09-21 15:51:58 +01:00
John Chilton 07dd69edd5 Allow discover_datasets tag to use format attribute (instead of ext).
https://github.com/TGAC/tgac-galaxytools/commit/93514438cb50fab48d0e211f1e1869b0f591ed66#commitcomment-13349396.
2015-09-21 14:24:24 +01:00
Martin Cech c7d7736472 Merge pull request #757 from jmchilton/framework_tests
Fix failing framework tests.
2015-09-19 10:34:07 -04:00
John Chilton c6be0bc12c Remove compare_bam_as_sam.xml test.
It never passed, it was originally used by me to test failing tests compared output of bams as sam files. Now that we want all these tests to pass we need to rethink how to test that aspect of the testing framework.
2015-09-19 10:29:23 +01:00
John Chilton 2b02677e85 Workaround for metadata_bam.xml failure. 2015-09-19 10:27:09 +01:00
Nicola Soranzo 989191d3ce Fix output_format framework test. 2015-09-18 17:48:59 +01:00
Dannon Baker 725261e35e Merge pull request #538 from jmchilton/dynamic_nested_collections
Allow tools to explicitly produce nested collections.
2015-08-07 12:52:00 -04:00
Dannon Baker 7c299faed3 Merge branch 'release_15.07' into dev 2015-08-01 08:10:03 -04:00
John Chilton 3945c5ed6c Add some docs to more complicated nested collection creation examples.
As suggested by @bgruening in https://github.com/galaxyproject/galaxy/pull/538#discussion_r36004578.
2015-07-31 15:13:00 +01:00
John Chilton 84e8e3e71f Allow tools to create nested collections with dynamic structure.
In this context dynamic structure means the number of elements and identifiers in lists (at some or any level) are not known ahead of time. In these cases, tool authors must resort to using <discover_dataset> tags.

The generic example tool demonstrating this is test/functional/tools/collection_creates_dynamic_nested.xml - which demonstrates building a list of lists from a tool.

A common use case will probably be building a list of pairs, a tool demonstrating this can be found at test/functional/tools/collection_creates_dynamic_list_of_pairs.xml. The <discover_datasets> tag infers dynamic information from the filename - so this tool demonstrates mass renaming of a common file name pattern for pairs (_1/_2 suffixes) into a format more readily consumed by <discover_datasets> in a portable shell fashion.

Previously, these <discover_dataset> tags would just use the "designation" concept as the element identifier when building collections. This was insufficient for nested collections because an identifier must be specified at each level of the collection. Now <discover_dataset> tags may define multiple identifier_N patterns - e.g. identifier_0, identifier_1, etc.... If these are specified, a desigination no longer must be specified and will just be interpreted as <value_0>:<value_1>:.... This scheme is completely backward compatible and when there is only a single identifier - desigination and identifier_0 can be used interchangeably.

Testing:

The simple list of lists tool test case can be executed using:

```
./run_tests.sh -framework -id collection_creates_dynamic_list_of_pairs
```

This verifies the nested datasets are setup properly.

The list of pairs example tool test case can be executed using:

```
./run_tests.sh -framework -id collection_creates_dynamic_list_of_pairs
```

This additionally verifies paired dataset collections can be created this way and that the shell commands in the example work properly for renaming the files for easy discovery.

Finally, the following existing test case verifies that designation can be used in lieu of identifier_0 for flat collections (i.e. this generalization is backward compatible):

```
./run_tests.sh -framework -id collection_split_on_column
```
2015-07-31 14:10:55 +01:00
John Chilton 13ea86753a Allow tools to explicitly create nested collections with static structure.
https://bitbucket.org/galaxy/galaxy-central/pull-request/634/allow-tools-to-explicitly-produce-dataset added the ability for tool to create simple collections (lists and pairs). It also outlined three creation scenarios - fixed collections, pre-determinable collection structures (like output lists based on input lists), and fully dynamic output collections. This pull request allows tool to output nested collections for these first two.

Fully dynamic nested collections (using <discover_datasets> tags) is not implemented in this commit.

Additionally, the tool test syntax has been extended to allow testing nested collection elements and an example tool is included that demonstrates this functionality - test/functional/tools/collection_creates_list_of_pairs.xml.
2015-07-31 14:10:54 +01:00
John Chilton b481e74419 Allow dbkey filtering of multiple input targets.
Fixes #388. Includes a test case.
2015-07-31 11:09:45 +01:00
John Chilton 607aca84e7 Add test tool demontrating filtering selections based on dbkey. 2015-07-31 11:09:45 +01:00
John Chilton e8f3553404 Fix expect_failure="true" failure semantics to cover tool submission failure.
Previously it just covered runtime job failure - there should probably be a way for the tool developer to specify which sort of failure is expected.
2015-07-31 11:09:44 +01:00
Dannon Baker 7019e32305 Merge with dev 2015-07-17 07:54:25 -04:00
Nicola Soranzo cc9b0bed85 Fix all E712 errors. Standardize sqlalchemy imports. 2015-07-14 20:49:34 +01:00
John Chilton 163b0e37ca Implement <filter> tag for output collections.
Closes #445.
2015-07-14 10:18:24 +01:00
Bjoern Gruening 1bbff415f2 lint fixes for test/functional/ 2015-07-12 21:32:49 +01:00
John Chilton 7879327c34 Add more interesting expression to environment_variables demo tool.
Per suggestion by @nsoranzo (https://github.com/galaxyproject/galaxy/pull/395#issuecomment-114827531).
2015-06-24 08:55:44 -04: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