CINPLA / exdir

Directory structure standard for experimental pipelines.
http://exdir.rtfd.io
MIT License
72 stars 13 forks source link

try except with pathlib and pathlib2 #77

Closed lepmik closed 5 years ago

lepmik commented 5 years ago

https://github.com/CINPLA/exdir/issues/74

codecov[bot] commented 5 years ago

Codecov Report

Merging #77 into dev will decrease coverage by 1.97%. The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #77      +/-   ##
==========================================
- Coverage   97.13%   95.16%   -1.98%     
==========================================
  Files          11       11              
  Lines        1433     1469      +36     
==========================================
+ Hits         1392     1398       +6     
- Misses         41       71      +30
Impacted Files Coverage Δ
tests/test_raw.py 88.09% <28.57%> (-11.91%) :arrow_down:
tests/test_group.py 94.39% <28.57%> (-2.07%) :arrow_down:
tests/test_object.py 87.03% <28.57%> (-8.8%) :arrow_down:
tests/test_help_functions.py 94.81% <28.57%> (-3.64%) :arrow_down:
tests/test_file.py 96.27% <28.57%> (-2.63%) :arrow_down:
tests/conftest.py 61.64% <28.57%> (-4.03%) :arrow_down:

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 6f570b0...5c890f7. Read the comment docs.

lepmik commented 5 years ago

The reason I put the second try except is to raise the error from the first try except . That is, if you don't have either pathlib or pathlib2 you will get an error saying you don't have pathlib, not pathlib2 as your suggestion would result in.

lepmik commented 5 years ago

@dragly do you concur?