Skip to content

[WIP] Add workflow step parameters to workflow editor#6829

Closed
mvdbeek wants to merge 16 commits intogalaxyproject:devfrom
mvdbeek:workflow_step_parameters
Closed

[WIP] Add workflow step parameters to workflow editor#6829
mvdbeek wants to merge 16 commits intogalaxyproject:devfrom
mvdbeek:workflow_step_parameters

Conversation

@mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Oct 8, 2018

This should allow specifying text, integer, float, boolean and color Parameters that can be re-used across workflow nodes. This build on 45962f3

@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 10, 2018

A good fraction of the UI is there and seems to work OK-ish, but the actual non-data parameter replacement only works for new-style workflow API submissions with inputs. The workflow run form still uses a different format for this. I'll see if it is sufficient to just move input_parameter to inputs, but IIRC there was a longer-term plan to unify UI and API. That isn't happening anytime soon, right ?

],
}

if trans.app.config.enable_beta_workflow_modules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My two cents is that I'd keep the option and just promote parameter_input to an un-beta parameter.

@jmchilton
Copy link
Member

I'll play with this and see if I can figure out an opinion on the API unification and fix the tests.

@jxtx
Copy link
Contributor

jxtx commented Oct 11, 2018

Oooooh. Screenshots?

@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 11, 2018

Nothing fancy yet:
screen shot 2018-10-11 at 17 50 32
screen shot 2018-10-11 at 17 51 42

We should separate the data and non-data inputs in the workflow node (a bar, and maybe different color noodle), and the workflow inputs should move to the top where we also render the old workflow replacement parameters. And I'm sure there are plenty of bugs in there, just trying to figure this out.

@jmchilton
Copy link
Member

The workflow run form still uses a different format for this. I'll see if it is sufficient to just move input_parameter to inputs, but IIRC there was a longer-term plan to unify UI and API. That isn't happening anytime soon, right ?

:( indeed it does. I'll start with the input parameters and see if I can separate them out, after that if I can separate out the data parameters so we are tracking them with database integrity using proper tracking with WorkflowRequestToInputDatasetAssociation / WorkflowRequestToInputDatasetCollectionAssociation the way standardized API calls with generate.

@jmchilton
Copy link
Member

Working on ripping parameter inputs from the raw param map produced by the tool form and I encountered another problem - it looks like this branch breaks the parameter_inputs in some way. In particular the following test case that works in dev:

./run_tests.sh -api test/api/test_workflows.py::WorkflowsApiTestCase::test_run_with_text_connection

No longer works, the key line in the logs I think is seeing that there is an unmatched input connection.

galaxy.workflow.modules WARNING 2018-10-12 10:31:42,351 Failed to use input connections for inputs [set([u'seed_source|seed'])]

I'm going to see if I can figure out what caused this - none of the backend changes are obvious problems at first glance to me.

return (self.output_name == WorkflowStepConnection.NON_DATA_CONNECTION and
self.input_name == WorkflowStepConnection.NON_DATA_CONNECTION)
return (self.output_name == self.input_name == WorkflowStepConnection.NON_DATA_CONNECTION or
self.output_step and self.output_step.type == 'parameter_input')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this diff fixes the test case. I guess there aren't docs for this - but I don't like this change. The parameter_input is transferring data to the step - it isn't an implicit connection so this should return False IMO. I see why you made the change here - for when building the editor dict:

                 # FIXME: this removes connection without displaying a message currently!
+                input_connections = [conn for conn in input_connections if conn.input_name in data_input_names]
-                input_connections = [conn for conn in input_connections if conn.input_name in data_input_names or conn.non_data_connection]

Maybe we should bite the bullet and just not do that filtering at all - push all the connections to the editor? This way the editor can tell the user if there are invalid connections found and we can eliminate that FIXME?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

var type = output.type;
var terminal = new Terminals.OutputParameterTerminal({
element: this.el,
datatypes: type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these changes be reverted - given the class below?

Copy link
Member Author

@mvdbeek mvdbeek Oct 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, sure, should have cleaned this up before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to remove this via rebase on this commit and force push to your branch - hope that is okay.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@jmchilton
Copy link
Member

@mvdbeek any chance I can take this over this week and rebase #6776 underneath it? I'd like to add some Selenium tests and see if I can implement default values, but I can wait on you and limit the scope at how it stands now if you'd like.

@mvdbeek
Copy link
Member Author

mvdbeek commented Oct 22, 2018

Sure, go ahead, happy to get this rolling!

@jmchilton
Copy link
Member

@mvdbeek My new change is still creating more issues then solving and the GUI is terrible - but this is an outline of separating RuntimeValue into RuntimeValue and ConnectedValue (jmchilton@15e667c).

I guess my next step is to try to make data and non-data parameters more similar in terms of the tool state and module interface. The data parameters should have ConnectedValue as their tool state value and then we can uniformly have inputs with ConnectedValues appear with connections and eliminate the distinction between parameters and inputs. This will be good from an interface perspective but is also required for CWL where a parameter that can take an integer or a File for instance is totally possible. I'll probably merge #6911 into that to provide that consistent interface on the backend, I'll rework the frontend a bit - I think you have the right classes I just want to change how their instantiated a bit I think.

mvdbeek and others added 14 commits October 24, 2018 10:19
In the current state when a text, integer, float, boolean or
boolean parameter is set as "Set at Runtime" a new connectable
input appears for the tool node, to which a Parameter can be properly
dragged and connected.

This still needs a little more separation from data inputs/outputs,
and the new connection isn't persisted in a meaningful way.
select lists don't take a `value` argument.
…dules

I don't think anyone will start using them if they're hidden behing this
flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants