boutproject / xBOUT

Collects BOUT++ data from parallelized simulations into xarray.
https://xbout.readthedocs.io/en/latest/
Apache License 2.0
22 stars 10 forks source link

Use duck-check for path-like objects #146

Closed johnomotani closed 4 years ago

johnomotani commented 4 years ago

Test if datapath is convertible to a pathlib.Path(). More robust than isinstance() check, and removes explicit dependency on py package.

Fixes #145

codecov-commenter commented 4 years ago

Codecov Report

Merging #146 into master will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
+ Coverage   77.82%   77.87%   +0.05%     
==========================================
  Files          14       14              
  Lines        2178     2183       +5     
  Branches      496      496              
==========================================
+ Hits         1695     1700       +5     
  Misses        308      308              
  Partials      175      175              
Impacted Files Coverage Δ
xbout/load.py 79.34% <100.00%> (-0.07%) :arrow_down:
xbout/utils.py 80.83% <100.00%> (+0.40%) :arrow_up:

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 6f7a512...ec21e52. Read the comment docs.