New Workflow Modules - Input Parameters and Subworkflows#1306
New Workflow Modules - Input Parameters and Subworkflows#1306guerler merged 11 commits intogalaxyproject:devfrom
Conversation
|
@jmchilton there are a few tailing tests, especially the simple sub-workflow test is failing.
Midterm ideas: It would be nice to switch quickly to a subworkflow and adjust settings. Docker Image to test: |
|
@bgruening Thanks for the initial review and Docker image.
Your midterm ideas are excellent. I think many of them would be more competently implemented by @guerler. Workflow previews seem on the surface challenging - maybe just exposing the description and annotation information would be more feasible. Regardless, I'll create an issue for refinements to workflow nesting. |
d873f9d to
9e641d6
Compare
|
Updated PR with bug fixes (same fixes that fixed #1302) and adding the "copy into" functionality in addition to the "link into" functionality already included in the PR. Updated description to include a screenshot distinguishing these. |
|
Image is updated:
Fair enough.
I saw this small symbol and everything worked great. Maybe I missed that to say, I'm too excited!!!
Awesome! +1 from my site if the usability issues can be fixed in this release cycle. |
|
@jmchilton one question regarding your Input Parameters. Is this framework flexible enough to enable text files as parameter inputs? Use case: Calculate |
|
@bgruening Not yet, CWL has this concept of expression tools and I have been working on a pure Galaxy (you know with XML 😄) analog common-workflow-lab@96f6550 that should enable something like this. Needs some work still, I am hacking on it though. |
|
Awesome you rock! Just wanted to make sure we can tackle this use case as well in your implementation/design ... but sure you thought of everything! I should have known better! |
|
Thanks @jmchilton !!! Really terrific!!!!!! After some tests on the Docker image through our genocloud instance http://cloud-87.genouest.org/, it seems to work. Just few remarks. Is it possible to see the name of the subworkflow on the workflow editor ? We have encountered some save / rename issues who seem to be more related to communication lag between docker image / cloud machine / host machine than to new workflow functionalities.... |
9e641d6 to
a9043d9
Compare
a9043d9 to
697a51c
Compare
|
Now rebased for #1322 and #1323. I'll work on placing some information about the original workflow in for @yvanlebras. Does anybody agree strongly with @bgruening about clicking the workflows? I feel like I prefer the current setup with two icons over this suggestion. |
Not an usability expert, but I think that the current setup is ok because the workflow name is not underlined. |
|
@nsoranzo Am I going to get a line-by-line 🐦 👀 critique of this or is it too big? Is there some sort of API for requesting such reviews 😄? |
|
@jmchilton 😆 I'm going on holiday in 24h, I doubt I'll have time to review any big PR for the next 20 days, sorry! |
|
@nsoranzo We pay you too much to take 20 days off - GET BACK TO WORK 🐦 👀! |
[WIP] Additions to galaxyproject#1306
|
I know a few different people who care about workflows have at least looked at and thought about the input parameter stuff and had at worst neutral comments - so I am going to go ahead and merge those database migrations. |
… one migration.
- Implement a input parameter module that mirrors data and collection input modules but has a type that can currently be one of text, integer, float, color, and boolean. - Allow connections between these and tool step inputs. - Extend model to support this. - Add new input types for format 2 workflow definitions for various types that all map to this kind of step. Typed inputs such as this match well with CWL workflow inputs. Someday I imagine these will be superior to just marking a tool input "Specify at Runtime" for all the same reasons input steps are superior to leaving inputs unattached.
Details: - Add a new workflow module describing subworkflows. - Add workflow list to editor side panel - with options to link in a subworkflow module or copy the target workflow into the workflow being editted node for node. - Update workflow, workflow step, and workflow invocation models to track subworkflow connections and execution. - Extend workflow outputs with concepts of labels (and UUIDs while I'm there) to match workflow inputs. This allow us to have something to label outputs with in the workflow editor and to reference in the format 2 workflow description language. - Extend workflow editor UI to allow labeling workflow outputs (and enforce that these are unique across a workflow). - Extend workflow invocation and progress tracking to allow invoking a subworkflow as part of another workflow invocation. - Extend workflow import and export code to allow a nested representation of workflows. - Update format 2 workflow description to allow testing nested workflows. Most relevant new and modified test cases can be run using the following commands: ``` ./run_tests.sh -api test/api/test_workflows.py:WorkflowsApiTestCase.test_run_subworkflow_simple ./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_subworkflow_simple ./run_tests.sh -api test/api/test_workflows_from_yaml.py:WorkflowsFromYamlApiTestCase.test_outputs nosetests test/unit/test_galaxy_mapping.py nosetests test/unit/workflows/test_workflow_progress.py ```
|
Picture of updated UI by @guerler that allows clicking on the workflows common-workflow-lab#13. @guerler Is that the last of your changes, if you are read to merge I can rebase. |
|
TS tests run fails at |
|
@martenson should be fixed by c04899a. This branch is an absolute mess, but @guerler is working on some stuff still so I don't want to rebase quite yet. |
810faec to
b4bfde4
Compare
|
Old messy history backed up here https://github.com/jmchilton/galaxy/tree/subworkflow_prerebase_1, I've rebased on top of the latest dev and this is now a clean history with one database migration. |
|
@yvanlebras The subworkflow name is shown now in the workflow editor and can be edited. As usual there are many more good follow up suggestions but this looks like a great step towards subworkflows to me 👍 |
New Workflow Modules - Input Parameters and Subworkflows
|
@guerler thanks for the merge and thanks for all the enhancements! |
PR galaxyproject#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 galaxyproject#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 galaxyproject#7545 (comment)), 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.
PR galaxyproject#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 galaxyproject#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 galaxyproject#7545 (comment)), 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.
Overview
This PR contains two new workflow modules to bring in concepts required to implement CWL workflows in Galaxy - nested workflows and input parameters. I developed these in the CWL fork of Galaxy but I am confident they will be very useful for vanilla Galaxy workflows.
Process
If people generally agree to this PR - I'd like to merge e4c9ddb and 22f06b7 which have two database migrations into one before it is merged. I'm keeping them separated for now in case people object to one of these workflow modules but not the other.
Nested Workflows
Following screenshot demonstrates two ways to utilize workflows within another workflow:
Workflow Input Parameters (Experimental)
Labeled as experimental since the UI isn't developed but someday I imagine these will be superior to just marking a tool input "Specify at Runtime" for all the same reasons input steps are superior to leaving inputs unattached.