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] Gracefully handle empty input_spec arg passed to Workflow init #497

Merged
merged 3 commits into from
Oct 5, 2021

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Sep 21, 2021

This PR handles the case where an empty input_spec is provided to a Workflow init by raising a ValueError. Otherwise, the init enters an infinite recursion loop attempting to access the input spec.

Acknowledgment

  • [ x ] I acknowledge that this contribution will be available under the Apache 2 license.

Types of changes

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary

Handles the case when an empty input_spec is provided to Workflow init by raising an exception

Checklist

  • [ x ] All tests passing
  • [ x ] I have added tests to cover my changes
  • I have updated documentation (if necessary)
  • [ x ] My code follows the code style of this project
    (we are using black: you can pip install pre-commit,
    run pre-commit install in the pydra directory
    and black will be run automatically with each commit)

@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #497 (de03e10) into master (35c16f6) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #497      +/-   ##
==========================================
+ Coverage   83.01%   83.04%   +0.02%     
==========================================
  Files          20       20              
  Lines        4045     4046       +1     
  Branches     1118     1118              
==========================================
+ Hits         3358     3360       +2     
  Misses        491      491              
+ Partials      196      195       -1     
Flag Coverage Δ
unittests 82.97% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
pydra/engine/core.py 89.28% <100.00%> (+0.18%) ⬆️

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 35c16f6...de03e10. Read the comment docs.

@tclose tclose marked this pull request as ready for review September 21, 2021 11:06
@tclose tclose changed the title Merge pull request #495 from djarecka/doc/fix_sphinx Gracefully handle empty input_spec arg passed to Workflow init Sep 21, 2021
@tclose tclose changed the title Gracefully handle empty input_spec arg passed to Workflow init **[FIX]** Gracefully handle empty input_spec arg passed to Workflow init Sep 21, 2021
@tclose tclose changed the title **[FIX]** Gracefully handle empty input_spec arg passed to Workflow init [FIX] Gracefully handle empty input_spec arg passed to Workflow init Sep 21, 2021
Co-authored-by: Dorota Jarecka <djarecka@gmail.com>
@djarecka djarecka merged commit eb70454 into nipype:master Oct 5, 2021
@djarecka
Copy link
Collaborator

djarecka commented Oct 5, 2021

@tclose - Thank you! Would you like to add your name to the zenodo file? https://github.com/nipype/pydra/blob/master/.zenodo.json

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