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

RF: Clean-up the BaseInterface run() function using context #3347

Merged
merged 2 commits into from
Jul 23, 2021

Conversation

oesteban
Copy link
Contributor

@oesteban oesteban commented Jun 22, 2021

Python contexts seem the most appropriate pattern to follow.

Summary

Fixes # .

List of changes proposed in this PR (pull-request)

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

Python contexts seem the most appropriate pattern to follow.
@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #3347 (24f2cbc) into master (0289137) will increase coverage by 0.02%.
The diff coverage is 82.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3347      +/-   ##
==========================================
+ Coverage   65.08%   65.11%   +0.02%     
==========================================
  Files         307      307              
  Lines       40362    40373      +11     
  Branches     5329     5326       -3     
==========================================
+ Hits        26270    26288      +18     
+ Misses      13019    13014       -5     
+ Partials     1073     1071       -2     
Flag Coverage Δ
unittests 64.83% <82.50%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/utils/profiler.py 22.27% <57.89%> (+3.88%) ⬆️
nipype/interfaces/base/support.py 80.93% <86.95%> (+1.39%) ⬆️
nipype/interfaces/base/core.py 88.17% <100.00%> (+2.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0289137...24f2cbc. Read the comment docs.

@oesteban
Copy link
Contributor Author

oesteban commented Jul 16, 2021

I've been noticing that under some (yet unknown) conditions, the node report after a crash will show definitely set inputs as undefined, and some errors that escape generating a crash file.

This PR, in collaboration with #3349, makes the flow of operations a bit more clear and makes the treatment of errors more reliable.

@oesteban
Copy link
Contributor Author

To note, I have tested this and #3349 locally with fMRIPrep and dMRIPrep and they seem to work as expected.

Copy link
Member

@satra satra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some things to discuss about exceptions.

@oesteban oesteban force-pushed the enh/interface-cleanup branch from d78d434 to 24f2cbc Compare July 21, 2021 15:37
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too.

@effigies effigies changed the title ENH: Clean-up the BaseInterface run() function using context RF: Clean-up the BaseInterface run() function using context Jul 23, 2021
@effigies effigies merged commit 7080ef9 into nipy:master Jul 23, 2021
@oesteban oesteban deleted the enh/interface-cleanup branch August 6, 2021 20:22
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.

3 participants