Commit Graph
265 Commits
Author SHA1 Message Date
mvdbeek 93419bc3ce Add workflow testcase for ColumSetAction PJA 2019-05-24 10:07:03 +02:00
mvdbeek 556ee003ae Fix parse_values_from_file tool and tests 2019-05-14 00:14:34 +02:00
mvdbeek 974f45b043 Allow mapping over of expression tool params
This allows feeding a collection of parameters values to a parameter
value. This enables https://github.com/galaxyproject/tools-iuc/pull/2404#issuecomment-491740393
for instance, where we normalize a collection based on a computed
parameter.
2019-05-14 00:14:34 +02:00
mvdbeek 0b8dec5af0 Make sure dependent jobs are being unpaused
Fixes https://github.com/galaxyproject/galaxy/issues/6926
2019-04-11 19:35:20 +02:00
Nicola Soranzo a12db037ca Merge branch 'release_19.01' into dev 2019-04-11 00:43:45 +01:00
mvdbeek 4c9e4118f5 Restrict workflow invocation index to current user
If the user is not an admin.
Fixes https://github.com/galaxyproject/galaxy/issues/7710

An alternative would be to skip Accessibility / Ownership
exceptions, but given that we can just restrict the query
this seems like the better approach to me.
2019-04-10 11:13:59 +02:00
mvdbeek 6653d3ae9d Adjust test_run_with_numeric_input_connection to extra line
introduced in https://github.com/galaxyproject/galaxy/pull/7634
2019-04-02 21:23:49 +02:00
Nicola Soranzo 057afbca9a Merge branch 'release_19.01' into dev 2019-04-02 11:02:46 +01:00
mvdbeek e8ea08dd61 Add testcase for mapped over discovered dataset consumption 2019-03-31 13:56:42 +02:00
mvdbeek 0aac0a1dc6 Use correct tools in skip_without_tool decorator 2019-03-21 20:26:02 +01:00
mvdbeek db0c39370f Test that switching parameters results in filtered outputs 2019-03-21 20:25:43 +01:00
John Chilton 2f79331288 Fix numeric connection test for Python 3. 2019-03-21 13:18:38 -04:00
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
mvdbeek c80b80d3cf Fix test_workflow_resume_with_mapped_over_input test
self.dataset_populator._get_contents_request(history_id=history_id).json()
returns the dataset collection as the first element.
We do need a HDA here though, so we'd just randomly pick
a HDA with the HDCA ID. So if that dataset was deleted by chance the
test would fail. Ouch.
2019-03-20 12:55:05 +01: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 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
mvdbeek df8a4dcf16 Fix ChangeDatatypeAction for collections 2019-03-11 21:48:10 +01:00
mvdbeek dc23227378 Add tests for delete_intermediate and change_datatype PJAs
`change_datatype` wasn't part of gxformat2, so this also requires
a new release of gxformat2 with https://github.com/jmchilton/gxformat2/pull/7
2019-03-11 21:48:09 +01:00
mvdbeek 88fd52a4bb Test PJA actions
The rename action works, the hide action fails.
Building this to fix
https://github.com/galaxyproject/galaxy/issues/7473.
2019-03-11 21:48:09 +01:00
John Chilton cc62d06899 Merge pull request #7480 from mvdbeek/fix_build_list_pjas
Fix post job actions for Database Operation tools, implement change_datatype for collection output
2019-03-11 16:38:43 -04:00
Nicola Soranzo 417292b501 Merge branch 'release_19.01' into dev 2019-03-10 21:44:29 +00:00
mvdbeek 377bffd3ae Fix ChangeDatatypeAction for collections 2019-03-08 16:59:05 +01:00
mvdbeek 62d8f2d5df Add tests for delete_intermediate and change_datatype PJAs
`change_datatype` wasn't part of gxformat2, so this also requires
a new release of gxformat2 with https://github.com/jmchilton/gxformat2/pull/7
2019-03-08 16:11:55 +01:00
mvdbeek 34dcc2458e Test PJA actions
The rename action works, the hide action fails.
Building this to fix
https://github.com/galaxyproject/galaxy/issues/7473.
2019-03-07 17:04:20 +01:00
mvdbeek 05dbbe5b6e Use correct tools in skip_without_tool decorator 2019-03-05 21:49:08 +01:00
mvdbeek 5c521e1ba8 Test that switching parameters results in filtered outputs 2019-03-05 14:58:18 +01:00
mvdbeek 76be1263ca Test that workflows with hidden params can be run 2019-03-04 18:41:51 +01:00
Martin Cech 3b49be59a1 Merge branch 'release_19.01' into dev 2019-02-05 14:03:56 -05:00
Dannon e4d798cecd Merge pull request #7254 from mvdbeek/subworkflow_connectivity
Determine collection_type for all workflow steps
2019-02-05 13:29:08 -05:00
mvdbeek a36b56e694 Drop redundant wait for history
wait_for_invocation_and_jobs does that already, thx @nsoranzo.
2019-02-05 15:39:42 +01:00
mvdbeek cf68cbe907 Verify that list:list will be reduced to list in multi data input 2019-02-05 14:11:27 +01:00
Nicola Soranzo d5a406cef7 Fix errors reported by new flake8 3.7.3 2019-01-31 13:47:21 +00:00
mvdbeek ef50e87297 Only fill collection_type for subworkflows, the top level stuff is managed by the client 2019-01-28 14:44:52 +01:00
Martin Cech 11428a03b8 Merge pull request #7019 from jmchilton/path-aware-workflows
File-based Workflow Editor
2018-12-07 16:18:26 -05:00
John Chilton 8470e91296 Merge pull request #7020 from frederikcoppens/public_api_wf
Expose published workflows through API
2018-11-21 13:13:50 +01:00
John Chilton 45345533fb Test cases for public WF access to published workflows. 2018-11-21 08:59:40 +01:00
John Chilton 9bac3c44fa Path-aware workflows.
- Allow workflows to be uploaded via path using the GUI and and API for admins.
- Track the path and resync workflows on save (both .ga and format 2 workflows) - this will allow Planemo to leverage the Galaxy workflow editor to interactively save workflows.
2018-11-20 15:49:51 +01:00
Nicola Soranzo f9685459a4 Merge pull request #6850 from jmchilton/workflows_track_step_inputs
Track workflow step input definitions in our model.
2018-11-16 19:13:05 +01:00
John Chilton 67efd072ae Track workflow step input definitions in our model.
We don't track workflow step inputs in any formal way in our model currently. This has resulted in some current hacks and prevents future enhancements. This commit splits WorkflowStepConnection into two models WorkflowStepInput and WorkflowStepConnection - normalizing the previous table workflow_step_connection on input step and input name.

In terms of current hacks forced on it by restricting all of tool state to be confined to a big JSON blob in the database - we have problems distinguishing keys and values when walking tool state. As we store more and more JSON blobs inside of the giant tool state blob - the worse this problem gets. Take for instance checking for runtime parameters or the rules parameter values - these both use JSON blobs that aren't simple values, so it is hard to tell looking at the tool state blob in the database or the workflow export to tell what is a key or what is a value. Tracking state as normalized inputs with default values and explicit attributes runtime values should allow much more percise state definition and construction.

This variant of the models would also potentially allow defining runtime values with non-tool default values (so default values defined for the workflow but still explicitly settable at runtime). The combinations of overriding defaults and defining runtime values were not representable before.

In terms of future enhancements, there is a lot we cannot track with the current models - such as map/reduce options for collection operations (https://github.com/galaxyproject/galaxy/issues/4623#issuecomment-389544980). This should enable a lot of that. Obviously there are a lot of attributes defined here that are not yet utilized, but I'm using most (all?) of them downstream in the CWL branch. I'd rather populate this table fully realized and fill in the implementation around it as work continues to stream in from the CWL branch - to keep things simple and avoid extra database migrations. But I understand if this feels like speculative complexity we want to avoid despite the implementation being readily available for inspection downstream.
2018-11-15 21:34:02 +01:00
John Chilton c06a142e04 Workflow test case, inputs as outputs. 2018-11-15 18:15:47 +01:00
Marius van den Beek e98f63caf2 Merge pull request #6925 from jmchilton/workflow_step_parameters_3
Add workflow step parameters to workflow editor (try 3)
2018-11-10 20:45:32 +01:00
John Chilton 82a8eb05d6 Merge remote-tracking branch 'jmchilton/release_18.09' into dev_merge_1 2018-11-06 09:10:22 -05:00
John Chilton dd8d74f364 Unify data/non-data input/output handling for workflow editor.
Don't treat data and non-data inputs/outputs different at the API boundary or at the workflow-manager.js level. Keep differences at the level of walking inputs/outputs in the workflow module on the backend and at the terminal definition (models and views) level on the frontend. Make the code and interfaces more consistent in my opinion and is more compatible with future directions I'd like to take things with mix-mode inputs/outputs for CWL.
2018-11-05 20:52:25 -05:00
mvdbeek 9b42032098 Fill in default state for test_optional_workflow_output 2018-11-05 13:09:31 +01:00
M Bernt 4e098c5d52 tests: add parameter to output_filter 2018-11-01 17:23:17 +01:00
John Chilton 06aea92eb8 cleaner test test_run_subworkflow_runtime_parameters 2018-11-01 10:37:51 -04:00
John Chilton d4b6bf28b5 Test for parameter replacement of GUI-style normalized parameters. 2018-11-01 10:37:49 -04:00
John Chilton cdd1520434 Rework most test workflows to label maps for step definitions 2018-10-12 13:41:13 -04:00
John Chilton 00625839b3 Allow downloading Galaxy workflows as format 2 workflows. 2018-10-12 13:41:06 -04:00