Port: do not call validator if unspecified and port not required#173
Merged
Port: do not call validator if unspecified and port not required#173
Port: do not call validator if unspecified and port not required#173Conversation
Collaborator
|
Looks good. Just a quick question: Does this work for port namespaces as well? I'm thinking of cases like when the port namespace is not required but there are children that are (logically in such a case I feel that the namespace itself should be required too). |
If no value is specified for a non-required port, the validator should not be called because there is nothing to be validated. The current behavior of calling the validator regardless, forces all validators to deal with the `UNSPECIFIED` value that is passed, but this is a global constant that should remain internal to `plumpy` and not be used by client code.
d99a6cd to
d438b82
Compare
Collaborator
Author
|
Good point. I added an explicit test for namespaces as well. |
unkcpz
pushed a commit
to unkcpz/plumpy
that referenced
this pull request
Dec 14, 2024
…iidateam#173) If no value is specified for a non-required port, the validator should not be called because there is nothing to be validated. The current behavior of calling the validator regardless, forces all validators to deal with the `UNSPECIFIED` value that is passed, but this is a global constant that should remain internal to `plumpy` and not be used by client code.
agoscinski
pushed a commit
to agoscinski/plumpy
that referenced
this pull request
Apr 13, 2026
…iidateam#173) If no value is specified for a non-required port, the validator should not be called because there is nothing to be validated. The current behavior of calling the validator regardless, forces all validators to deal with the `UNSPECIFIED` value that is passed, but this is a global constant that should remain internal to `plumpy` and not be used by client code.
agoscinski
pushed a commit
that referenced
this pull request
Apr 13, 2026
) If no value is specified for a non-required port, the validator should not be called because there is nothing to be validated. The current behavior of calling the validator regardless, forces all validators to deal with the `UNSPECIFIED` value that is passed, but this is a global constant that should remain internal to `plumpy` and not be used by client code.
agoscinski
pushed a commit
that referenced
this pull request
Apr 13, 2026
) If no value is specified for a non-required port, the validator should not be called because there is nothing to be validated. The current behavior of calling the validator regardless, forces all validators to deal with the `UNSPECIFIED` value that is passed, but this is a global constant that should remain internal to `plumpy` and not be used by client code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #172
If no value is specified for a non-required port, the validator should
not be called because there is nothing to be validated. The current
behavior of calling the validator regardless, forces all validators to
deal with the
UNSPECIFIEDvalue that is passed, but this is a globalconstant that should remain internal to
plumpyand not be used byclient code.