Commit Graph
535 Commits
Author SHA1 Message Date
Nicola Soranzo f54246e1a1 Use encode() method instead of bytearray()
to encode a Unicode string to a binary one.
2018-08-21 12:35:05 +01:00
Nicola Soranzo 5bddd24d8b Remove unreachable return statement 2018-08-20 23:52:50 +01:00
mvdbeek 2d60d9af01 Wait for first workflow when testing cache
That should make the test less flakey. While in theory we should be able
to replace scheduled workflow jobs with cached jobs, this is not what
we're testing here, and I assume it doesn't work for now.
2018-08-20 11:29:02 +02:00
Dannon b9ca3b7c33 Merge pull request #6593 from jmchilton/toward_test_history_cleaning
Migrate API tests in test_jobs.py to use test_history context.
2018-08-16 09:46:39 -04:00
John Chilton c6b593b1ca Migrate API tests in test_jobs.py to use test_history context.
More configurable, better error reporting, cleans up jobs, etc..
2018-08-10 19:43:24 -04:00
mvdbeek 3d9c0b154a Make random_lines1 consistent on py2 and py3 (again)
Turns out integers are used as is in `random.seed()`, but strings are
hashed (in the version 1 protocol), and the hashing isn't stable. So
instead we hack around this by using `ord()` on each character and
concatenating the digits.  Yucky, but probably better than using numpy
and putting this tool on the list of tools that inherit galaxy's
environment (or adding a requirement tag and resolving with conda ...).
2018-08-10 22:21:21 +02:00
John Chilton 36e1d6cfce More use of test_history contextmanager in test_tools. 2018-08-09 11:37:18 -04:00
John Chilton 55436c3800 Merge pull request #5457 from mvdbeek/select_tag_parameter
Allow selecting subset of collection by group tag
2018-08-07 13:09:18 -04:00
Dannon Baker d1423b6e18 Merge branch 'release_18.05' into dev 2018-08-06 20:20:02 -04:00
Dannon Baker d7959568f8 Merge branch 'release_18.01' into release_18.05 2018-08-06 20:19:18 -04:00
mvdbeek ba47188f5e Introduce test for auto-labelling subworkflow workflow outputs 2018-08-06 15:55:27 +02:00
mvdbeek 049e4d0fa3 py3: Fix test_fetch_zip_to_folder test 2018-08-02 13:21:19 +02:00
mvdbeek 187457a461 py3: Don't rely on order of outputs, instead match by output name 2018-08-02 13:21:19 +02:00
mvdbeek 27a30b762d py3: Fix library tests 2018-08-02 13:21:19 +02:00
mvdbeek 8f73635499 py3: Fix upload jobs API tests 2018-08-02 13:21:19 +02:00
mvdbeek bbf739a3df py3: Fix tool_data API 2018-08-02 13:21:19 +02:00
mvdbeek dc9e5c5a83 py3: Fix authenticate api test 2018-08-02 13:21:19 +02:00
mvdbeek 8093d6b610 py3: Fix dataset collection test 2018-08-02 13:21:19 +02:00
John Chilton f56c0bbac2 Test case for nested collection input to flatten in a workflow.
Also exercises delayed workflow scheduling because of the dynamic discovery of the input collection.

xref #5867
2018-07-25 23:18:03 -04:00
John Chilton 9794d835e5 Fix to_dict with io_details=True for tools with collection outputs.
Fixes #6537 and includes a test case.
2018-07-25 12:32:38 -04:00
John Chilton d417e9b239 Flush out collection tag parameters a bit.
- Switch select_tag to group_tag as a parameter name - since it is restricted to group_tags and we don't call data parameters select_data.
- Add minimal XSD documentation for this new parameter type.
- Add example tools - for single and multiple tags.
- Add API tests for these tools and the tag handling.
2018-07-24 14:31:56 -04:00
John Chilton 4d8b13d0e5 Handle pasted content in fetch API.
Unlike upload 1.0, use different 'src' types to distinguish between URLs and pasted content - in the abstract this is better because it is more structured and practically this allows 'pasting' spreadsheets that start with URLs for instance (that is sometimes useful).
2018-07-23 10:13:25 -04:00
Dannon e794443f48 Merge pull request #6294 from jmchilton/better_tool_tests
Upload collections directly for tests.
2018-07-18 09:43:08 -04:00
Dannon Baker 9f73bc8985 Repsonse->response 2018-07-18 09:24:50 -04:00
John Chilton f9ba8d3823 Allow setting tags on targets & contents in data fetch API.
Rebased with default argument handling improvements suggested by Marius.
2018-07-16 08:46:57 -04:00
John Chilton 0280713c43 Auto-propagate group tags - the way name tags are propagated. 2018-07-12 10:45:58 -04:00
mvdbeek db5b368668 Don't rely on the order of history contents in test_map_over_collection_structured_like 2018-06-22 11:09:00 -04:00
John Chilton 8d5a4c3625 Transition API tests from upload datasets and assembling collecitons to uploading collections.
Should be a lot more efficient.
2018-06-21 08:12:30 -04:00
mvdbeek 647ba8531a Add test tool and workflow for mapping over with mapping output
This doesn't quite work because of the dynamic output collection,
which fails with:

```
galaxy.tools.parameters.output_collect DEBUG 2018-06-06 18:40:38,784 (3) Add dynamic collection datasets to history for output [reverse] (171.970 ms)
galaxy.tools.parameters.output_collect ERROR 2018-06-06 18:40:38,839 Problem gathering output collection.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/parameters/output_collect.py", line 340, in collect_dynamic_outputs
    collection_builder.populate()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 88, in populate
    elements = self.build_elements()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 59, in build_elements
    new_elements[identifier] = element.build()
AttributeError: 'HistoryDatasetAssociation' object has no attribute 'build'
```

This seems to happen because the inner collection is wrongly detected as
nested. In general I doubt that mapping over colleciton output works
with dynamically discovered output collections.
2018-06-20 09:54:40 -04:00
mvdbeek 6b7ee55bac Test list collection mapping over multidata input 2018-06-20 09:54:01 -04:00
John Chilton c601a9d491 Fix collection mapping to allow mapping over multi-data inputs.
It is jarring to users that works for collection inputs but not multiple data inputs, especially because the IUC discourages collection inputs when multiple data inputs would work.
2018-06-20 09:53:41 -04:00
John Chilton 1c7387c53a Merge pull request #6072 from mvdbeek/add_resume_job_api
Add resume job api
2018-06-18 15:11:14 -04:00
Marius van den Beek 02974b79c7 Merge pull request #5640 from Mataivic/patch-1
Add a FilterEmptyDatasetsTool and allow filtering tools to apply to arbitrary collection structures
2018-06-17 12:25:03 +02:00
mvdbeek 0507818bbe Add tests for filtering list:pair and list:list:pair collections 2018-06-13 16:38:37 +02:00
Martin Cech 5a27b0cf4d Merge pull request #6148 from jmchilton/cwl-small-stuff-2
Small fixes and small refactorings toward reuse in CWL branch (retry)
2018-06-12 15:35:47 -05:00
mvdbeek fd16302d65 Add test tool and workflow for mapping over with mapping output
This doesn't quite work because of the dynamic output collection,
which fails with:

```
galaxy.tools.parameters.output_collect DEBUG 2018-06-06 18:40:38,784 (3) Add dynamic collection datasets to history for output [reverse] (171.970 ms)
galaxy.tools.parameters.output_collect ERROR 2018-06-06 18:40:38,839 Problem gathering output collection.
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/tools/parameters/output_collect.py", line 340, in collect_dynamic_outputs
    collection_builder.populate()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 88, in populate
    elements = self.build_elements()
  File "/Users/mvandenb/src/galaxy/lib/galaxy/dataset_collections/builder.py", line 59, in build_elements
    new_elements[identifier] = element.build()
AttributeError: 'HistoryDatasetAssociation' object has no attribute 'build'
```

This seems to happen because the inner collection is wrongly detected as
nested. In general I doubt that mapping over colleciton output works
with dynamically discovered output collections.
2018-06-11 12:20:25 +02:00
mvdbeek 060d3f0ffd Test list collection mapping over multidata input 2018-06-07 15:05:06 +02:00
Nicola Soranzo 711070dc4c Merge branch 'release_18.01' into release_18.05 2018-06-07 10:28:42 +01:00
mvdbeek 90c091b5ab Add a test that exercises the new job resume API endpoint 2018-06-05 10:11:23 +02:00
Marius van den Beek 0ba8090d22 Merge pull request #6255 from jmchilton/subcollection_mapping_with_multi_data_inputs
Fix collection mapping to allow subcollection mapping over multi-data inputs.
2018-06-05 09:30:46 +02:00
Marius van den Beek 6911153c30 Merge pull request #6213 from jmchilton/one_more_identifier_test
Test element_identifier usage with single data parameters, in repeat/cond.
2018-06-04 16:19:01 +02:00
mvdbeek 3e22b0b11b Test case for mapping over inputs with output ftype determined via input extension 2018-06-04 07:00:41 -04:00
John Chilton 2f6c184e6f Merge pull request #6253 from mvdbeek/mapping_over_from_param_fixes
Mapping over from_param fixes
2018-06-04 06:59:18 -04:00
John Chilton b908ea4530 Fix collection mapping to allow mapping over multi-data inputs.
It is jarring to users that works for collection inputs but not multiple data inputs, especially because the IUC discourages collection inputs when multiple data inputs would work.
2018-06-01 06:20:27 -04:00
mvdbeek f8cc653b30 Pause job if input dataset state is paused 2018-05-31 16:18:39 +02:00
mvdbeek ed0b087926 Fail jobs with purged inputs
We can't resume these jobs anyway, so better to set them to failed.
Also resets the info field for datasets produced by resumed jobs.
2018-05-31 16:18:39 +02:00
mvdbeek 0e31f97269 Add a testcase for pausing jobs with deleted input
Fix test
2018-05-31 16:18:39 +02:00
mvdbeek 99889af1d5 Test case for mapping over inputs with output ftype determined via input extension 2018-05-31 15:15:16 +02:00
John Chilton 38dc3baef1 Test element_identifier usage with single data parameters, in repeat/cond. 2018-05-24 11:02:06 -04:00
John Chilton 03a815a2c3 Some more upload/sniff tests. 2018-05-24 10:31:28 -04:00