pydra
pydra copied to clipboard
FIX: If result.output is None, return None for all fields
Types of changes
- Bug fix
Summary
Result.output: ty.Optional[ty.Any] = None, but we assume that it's here. In https://github.com/nipype/pydra-tutorial/runs/8254183236, it is possible for it to be None when this is called, so it seems like one sensible thing to do is return None.
That said, it's possible that there's a bigger problem and we should not be trying to retrieve fields without first checking that result.output is not None.
Checklist
- [ ] I have added tests to cover my changes (if necessary)
- [ ] I have updated documentation (if necessary)
Codecov Report
Base: 77.08% // Head: 76.93% // Decreases project coverage by -0.15% :warning:
Coverage data is based on head (
1740a94) compared to base (86671ad). Patch coverage: 0.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #577 +/- ##
==========================================
- Coverage 77.08% 76.93% -0.16%
==========================================
Files 20 20
Lines 4320 4322 +2
Branches 1215 1216 +1
==========================================
- Hits 3330 3325 -5
- Misses 802 807 +5
- Partials 188 190 +2
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 76.86% <0.00%> (-0.13%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| pydra/engine/specs.py | 88.16% <0.00%> (-0.43%) |
:arrow_down: |
| pydra/engine/task.py | 85.53% <0.00%> (-1.24%) |
:arrow_down: |
| pydra/engine/core.py | 88.73% <0.00%> (-0.31%) |
:arrow_down: |
| pydra/engine/helpers.py | 80.14% <0.00%> (+0.23%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
i think self.output should never be None there... I will try to understand what really went wrong...
I think #592 should prevent this issue