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 |
sphuber
left a comment
There was a problem hiding this comment.
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_inputsandexpose_outputsto 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_outputsattribute of the spec.Adds
exposed_inputsandexposed_outputsto theProcessclass. 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_manymethod, which can be used with a dict as returned byexposed_outputsto add many outputs simultaneously.For additional details see the documentation included in this PR.