Closed sphuber closed 1 year ago
@danielhollas I think this should fix the problem of your workchain while maintaining the functionality that the commit in question tried to introduce. I still think that the use-case it is trying to address makes sense, but please let me know if you think it doesn't and the user should be forced to be more explicit.
Patch coverage: 100.00
% and no project coverage change.
Comparison is base (
485b196
) 90.82% compared to head (9d45c41
) 90.82%.:exclamation: Current head 9d45c41 differs from pull request most recent head 89eef4a. Consider uploading reports for the commit 89eef4a to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@sphuber thanks! I am happy to report that my workchain is happy with version 0.21.7. :-) I've opened a PR on plumpy-feedstock, I need a release on conda to be able to release a new aiidalab docker image.
Fixes #267
In https://github.com/aiidateam/plumpy/commit/4c29f4459c8eb8a8263049ac338189c604702e4e, the
get_port
method was updated to automatically create a port if it didn't exist and the namespace is dynamic instead of raising. But this had unwanted knock-on consequences (see previous commit for details).Here, the change in behavior is only triggered when the new argument
create_dynamically
is explicitly set toTrue
. This means that by default the old behavior is maintained of aValueError
being raised if the requested port doesn't exist. But nowProcess.out
can override the default toTrue
to automatically support nested namespaces in a dynamic output namespace.In the first commit, two tests are added. One for the desired behavior of
Process.out
and one as a regression test for the bug that was introduced with respect to the validation of excluded exposed ports.