-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement conditional workflow steps #14846
Conversation
cdcac2c
to
5f2cbee
Compare
171c285
to
ff9ab94
Compare
f2fe3ba
to
15bdadb
Compare
0d1b5c8
to
3550550
Compare
I think the backend is ready for a review ... I would probably split out the UI work into another PR (I should wrap up the first part of the workflow editor overhaul, that would make this easier). |
|
||
hda_references = [] | ||
|
||
def to_cwl(value): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so complicated and we're only basically testing boolean parameters right?
What if an integer is sent - what happens? A dataset? Etc...
Can we have a test that the workflow dies if an invalid expression is set in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've included a bunch of tests and I've also added "invocation messages", see the screenshot in the description ... I think we're now displaying (almost?) all of the possible workflow errors in the API and UI.
33ee880
to
195dd2f
Compare
…duces additional mapping over without being directly connected to a workflow input
More verbose, but pydantic/pydantic#1194 prevents a more concise setup.
0d89be7
to
9a47b5e
Compare
Test errors are unrelated |
if value["class"] == "File": | ||
# This is going to re-file -> HDA this each iteration I think, not a good | ||
# implementation. | ||
return progress.raw_to_galaxy(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nothing right? How did we let this in 😆. It seems it hasn't caused any harm yet!
This PR implements executing tool and subworkflow steps conditionally, based on the result of a javascript expression. The workflow editor will for now only allow the simplest expression, which is a connection to a boolean parameter (from an expression tool or a workflow input).
An example gxformat2 workflow looks like this:
If
when
evaluates totrue
the step will run, if it evaluates tofalse
it will not run.This is also implemented for mapped over tool and workflow steps; if an output is skipped it will be produce a null value. You can think of this as an optional output. That means you can use the
pickValue
expression tool to pick for instance the first created output for two mutually exclusive processing steps.Includes a whole new infrastructure for displaying scheduling warnings, failures and cancellations:
Remaining work:
How to test the changes?
(Select all options that apply)
License