Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: If result.output is None, return None for all fields #577

Closed
wants to merge 1 commit into from

Conversation

effigies
Copy link
Contributor

@effigies effigies commented Sep 8, 2022

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
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Base: 77.08% // Head: 76.93% // Decreases project coverage by -0.15% ⚠️

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%) ⬇️

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%) ⬇️
pydra/engine/task.py 85.53% <0.00%> (-1.24%) ⬇️
pydra/engine/core.py 88.73% <0.00%> (-0.31%) ⬇️
pydra/engine/helpers.py 80.14% <0.00%> (+0.23%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@djarecka
Copy link
Collaborator

i think self.output should never be None there... I will try to understand what really went wrong...

@djarecka
Copy link
Collaborator

I think #592 should prevent this issue

@djarecka djarecka closed this Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants