Commit Graph
167 Commits
Author SHA1 Message Date
Martin Cech e65604bc06 Merge pull request #7556 from jmchilton/expression_tools
Implement expression tools and non-data tool outputs.
2019-03-20 18:52:59 -04:00
John Chilton f5c93e868b Implement expression tools and non-data tool outputs.
PR #6925 introduced a GUI for connecting non-data (e.g. integer, boolean, color, etc..) workflow input parameter to tool input parameters (the backend for this was originally added in #1306). That ideally was just the beginning of work toward using such values in structured ways in workflows.

This PR extends tool output handling to allow producing of non-data parameters. These can serve as a source for non-data values in workflows the same work workflow input parameters can. To make such values more easy to produce, this PR also introduces Galaxy expression tools - mirroring functionality regularly used in CWL. These small JavaScript-based tools that consume inputs just like a regular Galaxy tool but that produce dictionary of non-data values.

I think these expressions will be maximally useful when paired with format 2 workflows once we allow users to load arbitrary tools (I make the case more in full here https://github.com/galaxyproject/galaxy/pull/7545#issuecomment-473894424), but I outline some potential uses there as well.

Because there is always a checklist in my PR descriptions:

- Tool definition language and plumbing and datatype for expressing expressions as jobs.
- Allow connecting expression tools to parameters in workflows, will delay evaluation of workflow so calculated value
- Example test expression tools for testing and demonstration.
2019-03-19 17:20:18 -04:00
John Chilton b4ade3b251 Improved API and testing around dynamic tool endpoint.
Test case for indexing dynamic tools and deactivating dynamic tools. Verify deactivation via attributes in resulting object but also by trying to run a deactivated dynamic tool and getting a 404.
2019-03-19 16:32:05 -04:00
John Chilton 4a308130b3 Undo DynamicTool.tool_hash that is the part that is really half baked. 2019-03-19 14:22:41 -04:00
John Chilton f6623b6e23 [WIP] Dynamic Galaxy tools.
- Introduce models and a API for creating tools dynamically.
 - Use Galaxy's testing-only YAML based representation of tools to prototype this.
 - Extend Format 2 workflow definitions to allow embedding tools directly into workflows, either directly or using a CWL-style @import syntax.

Testing:

Test cases demonstrating tools can be imported (only by admins) and are runnable are included with this commit. More test cases regarding workflow use of dynamic tools and Format 2 workflow definition extensions are also included.

These tests can be run with the following commands:

```
./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_nonadmin_users_cannot_create_tools
./run_tests.sh -api test/api/test_tools.py:ToolsTestCase.test_dynamic_tool_1
./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_import_export_dynamic
./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_workflow_embed_tool
./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_workflow_import_tool
```
2019-03-19 14:06:47 -04:00
Martin Cech 2c11362c75 add tests, add handling of cornercases 2019-01-18 11:47:00 -05:00
mvdbeek cd8b129b8e Fix test_test_data_download
This contains 5 items after
https://github.com/galaxyproject/galaxy-test-data/pull/2 had been
merged.
2019-01-04 19:13:11 +01:00
mvdbeek 4877bfafa6 Test that test-data paths outside of test-data folder cannot be downloaded 2019-01-01 21:37:03 +01:00
mvdbeek 6791f3b999 Also allow downloading test-data directories
This is (apparently ...) used by tools that create/test
directories in the extra_files_path.
2018-12-31 10:19:31 +01:00
mvdbeek 0d28c65c3d Allow anonymous downloading of test-data files 2018-12-31 10:19:31 +01:00
John Chilton e3bc005a86 Implement API endpoint for indexing extra files in a dataset. 2018-10-24 09:55:25 -04:00
John Chilton dd6b185ab8 Implement composite uploads on arbitrary datatypes.
Prior to this, composite uploads were only allowed for select data types. As far as I can tell, the framework itself allows arbitrary datatypes to have extra files. This allows the upload API to take in extra files for datatypes that aren't explicitly annotated has having extra files.

These may be specified one at a time or in directory structures via tar files.
2018-10-24 09:55:25 -04:00
Nate Coraor ca95d7a26e Merge remote-tracking branch 'upstream/release_18.09' into dev 2018-10-12 10:32:43 -04:00
John Chilton f3da0864b4 Test case for regression #6856. 2018-10-12 09:03:12 -04:00
Nicola Soranzo 6b3f672770 Replace deprecated assertEquals() method
Fix warnings during py34-unit tests like:

```
/home/travis/build/galaxyproject/galaxy/test/unit/workflows/test_extract_summary.py:46: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(job_dict[hda.job], [('out1', derived_hda_2)])
```

See e.g. https://travis-ci.org/galaxyproject/galaxy/jobs/438829277
2018-10-09 12:37:15 +01:00
Dannon Baker 55c90960e9 Merge remote-tracking branch 'upstream/release_18.09' into dev 2018-10-01 10:53:11 -04:00
mvdbeek ab660686c2 Add test for single and multi-input identifiers
test_identifier_map_over_input_in_conditional fails at the
moment (same issue as in https://github.com/galaxyproject/galaxy/issues/6182)
2018-09-28 19:01:28 +02:00
Martin Cech 3072889905 Merge branch 'release_18.05' into release_18.09 2018-09-20 11:48:45 -04:00
mvdbeek 3017568e77 Drop unnecessary history in test_show_with_wrong_tool_version_in_tool_id test 2018-09-19 16:40:59 +02:00
mvdbeek f6f526a0a5 Use tool_version instead of version parameter
To be consistent with other routes that accept this parameter.
2018-09-19 15:39:00 +02:00
mvdbeek 806beaca9b Test that newest version will be returned if tool id or version don't match 2018-09-19 15:39:00 +02:00
Dannon Baker ed147ee052 Merge branch 'release_18.09' into dev 2018-09-18 13:51:56 -04:00
John Chilton 376516610e Bugfix - missing tests for data source sniffing.
Ensure #6334 is fixed I think.
2018-09-18 11:29:58 -04:00
mvdbeek 17d148eb8f Use tool_version instead of version parameter
To be consistent with other routes that accept this parameter.
2018-09-13 20:30:52 +02:00
mvdbeek 943e67e4e5 Test that newest version will be returned if tool id or version don't match 2018-09-13 13:25:09 +02:00
Marius van den Beek 0e69ca8bfb Merge pull request #6545 from jmchilton/rule_builder_use_group_tags
Allow Consuming Tags in the Apply Rules Tool
2018-08-26 11:17:14 +02:00
John Chilton 49693814a9 Unified dataset permission API.
There was an existing library dataset permission API and one proposed for HDAs in #6461. This tries to reconcile the two approaches and move toward managers.

- Proper treatment of "master_api_key" throughout the manager layers related to this.
- Use PUT instead of POST, since that is more appropriate for updates I believe.
- Use a similar URL pattern for library datasets, history contents, and dataset APIs.
- Generalize the dataset API to allow HDA or LDDA inputs (the proposal for the new API in #6461 added an HDA-only option to the dataset API - this isn't how that API layer is meant to be used I believe).
- Add an HDA only endpoint in the history contents API for this functionality to mirror the library dataset API.
- Use consistent and backward compatible payload parsing for these endpoints.
- Use consistent serialization for the result of these changes.
- Generalize the HDA variant of this to allow different actions - such as make public and make private that were available in the library dataset variant.
- Test cases for the new API endpoints, the roles API, tests for permissions during collection creation and running tools with both dataset and collection inputs.
2018-08-10 19:42:31 -04: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 187457a461 py3: Don't rely on order of outputs, instead match by output name 2018-08-02 13:21:19 +02:00
John Chilton 5807230253 Implement rule builder rule to quickly grab group tag value.
Should make it a lot easier to nested and filter on group tag values.
2018-07-27 08:05:05 -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
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 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
mvdbeek 0507818bbe Add tests for filtering list:pair and list:list:pair collections 2018-06-13 16:38:37 +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
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 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 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