-
Notifications
You must be signed in to change notification settings - Fork 532
Meta-interface to wrap optionally executing interface #2416
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
Comments
@effigies - seems like this would be a better addition at the node/workflow level rather than a separate interface. and would this be any different from setting also, seems like you are thinking of this to implement some piece of branching logic, would it be useful to create a more general mostly thinking out aloud over here. |
Does And this is very limited branching logic, where the pathway is fully known and may just be skipped. The closest equivalent I can think of is But none of these is a true branch = EitherNode(left=InterfaceA(), right=InterfaceB(), criterion=decision_func, ...)
postproc_a = MaybeNode(InterfaceC())
postproc_b = MaybeNode(InterfaceD())
wf.connect([
(branch, postproc_a, [('left.out_file', 'in_file')]),
(branch, postproc_b, [('right.out_file', 'in_file')]),
]) A I'll give this some thought, and maybe find another insomniatic night to hack up a prototype of an Happy to hear any thoughts on this. |
Worth looking at #1299, maybe you can recover some ideas from there. |
@TheChymera - perhaps @effigies suggestion here relates to your #2492 - more generally it would be good to determine the list of such nodes and their functionalities. |
Any interest in adding a meta-interface like the following?
This wraps an interface such that, if the mandatory inputs are not set, the outputs are left undefined.
I'm currently thinking of it for the purposes of inserting a validation step for an optional input to another node that always run, but it could also be chained to set up a part of a pipeline that will only execute if an input is present, but will silently pass
Undefined
s otherwise.This is an initial hack, and some of the above might not be necessary. Currently testing with the following code:
The text was updated successfully, but these errors were encountered: