Process functions: Allow nested output namespaces #5954
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up till now, the following was not possible:
An exception would be raised by
plumpy
because thenested
output namespace, defined by theProcessSpec
that is automatically generated from the function signature, does not contain the portoutput
. The automatically generated process spec does mark the outputs namespace as dynamic, but this was not being applied recursively.Not only is this functionality for users, the
Parser.parse_from_node
functonality is currently broken if theParser
returns output nodes in nested namespaces. The reason is that theparse_from_node
creates acalcfunction
on-the-fly which raises when it gets the outputs with the nested labels. Even though the originalProcess
class may have specified these nested output namespaces, the on-the-fly calcfunction to capture the manual re-parsing does not support this.The addition of this functionality requires a change in
plumpy
.