-
Notifications
You must be signed in to change notification settings - Fork 191
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
Add expose inputs / outputs feature #1170
Add expose inputs / outputs feature #1170
Conversation
…dict The exposing is stored as _exposed_inputs / _exposed_outputs, which is a dict of [namespace][process_class].
…ure_expose_inputs_outputs
I merged the PR in |
…ure_expose_inputs_outputs
I think I know why the failing test is occurring. I am putting in a PR now and after that is merged we can merge |
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 have given it a little go on my workchains and for a sub set of the functionality that I need it seems to work. Since the validation is done for the entire input dictionary upon launching, I cannot use agglomerate yet as I would like, but I am not sure if and how that would be possible. I am approving this because what this does make possible seems to be working.
Fixes #660.
Adds the functions
expose_inputs
andexpose_outputs
to theProcessSpec
. Their options are:namespace
: expose to a specificPortNamespace
, meaning that the ports will be created in that namespaceexclude
: A list of keys which are not exposedinclude
: An explicit list of keys which are exposedThe information about which inputs / outputs were exposed is stored in the
_exposed_inputs
/_exposed_outputs
attribute of the spec.Adds
exposed_inputs
andexposed_outputs
to theProcess
class. They build up the input / output dictionary corresponding to a specific workchain class (and instance in the case of outputs). Options:namespace
: The namespace where it is looking for exposed keys.agglomerate
: Defines whether parent namespaces are also searched.Finally, it adds an
out_many
method, which can be used with a dict as returned byexposed_outputs
to add many outputs simultaneously.For additional details see the documentation included in this PR.