Handling input fields checking for Mandatory and Mutually exclusive fields #595
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.
Types of changes
Summary
We identified a possible issue with Pydra task input fields checking.
Input fields can be marked as 'mandatory' as well as 'mutually exclusive'.
If
then only field_A or field_B is needed, not both.
Nipype follows this behavior, but it seems like
check_fields_input_spec()
of the Pydra engine (pydra/pydra/engine/specs.py) is checking those conditions sequentially, not concurrently.Compared with
_check_mandatory_inputs()
(nipype/interfaces/base/core.py)Note
The unit test might be misplaced. Should it go in
test_shelltask_inputspec.py
?Checklist