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: Patch Path.mkdir for Python 2 #3037

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

effigies
Copy link
Member

Summary

This should be a blessedly short-lived hack, but it is needed to resolve nipy/heudiconv#374.

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

  • Path.mkdir() was failing for Python 2, due to a PY3 guard
  • Had to import TemporaryDirectory from nipype.utils.tmpdirs instead of tempfile
  • Updated our existing makedirs hack to include mode, for full replacement of os.makedirs

Acknowledgment

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

@oesteban
Copy link
Contributor

Not sure this will solve nipy/heudiconv#374 though.

@effigies
Copy link
Member Author

It did.

@codecov
Copy link

codecov bot commented Sep 18, 2019

Codecov Report

Merging #3037 into master will increase coverage by 0.01%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3037      +/-   ##
==========================================
+ Coverage   67.51%   67.53%   +0.01%     
==========================================
  Files         344      344              
  Lines       44094    44093       -1     
  Branches     5556     5555       -1     
==========================================
+ Hits        29772    29779       +7     
+ Misses      13576    13568       -8     
  Partials      746      746
Flag Coverage Δ
#smoketests 50.33% <50%> (+0.02%) ⬆️
#unittests 64.99% <92.85%> (+0.01%) ⬆️
Impacted Files Coverage Δ
nipype/utils/filemanip.py 80.65% <92.85%> (-0.04%) ⬇️
nipype/utils/tmpdirs.py 80.76% <0%> (+30.76%) ⬆️

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 23379eb...0196bea. Read the comment docs.

@effigies effigies merged commit f7d7a1c into nipy:master Sep 18, 2019
@effigies effigies added this to the 1.2.3 milestone Sep 20, 2019
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.

tests on python 2.7 started to fail within the past month
3 participants