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

Allow readers to accept pathlib.Path instances as filenames. #451

Merged
merged 3 commits into from Oct 9, 2018

Conversation

honnorat
Copy link
Contributor

@honnorat honnorat commented Oct 9, 2018

Allow readers to accept pathlib.Path instances as filenames.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.966% when pulling d5d0631 on EXWEXs:fix-pathlib into 2f45b54 on pytroll:master.

@coveralls
Copy link

coveralls commented Oct 9, 2018

Coverage Status

Coverage increased (+0.009%) to 72.975% when pulling 3ad0503 on EXWEXs:fix-pathlib into 2f45b54 on pytroll:master.

@codecov
Copy link

codecov bot commented Oct 9, 2018

Codecov Report

Merging #451 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #451      +/-   ##
==========================================
+ Coverage   72.96%   72.97%   +<.01%     
==========================================
  Files         134      134              
  Lines       17689    17695       +6     
==========================================
+ Hits        12907    12913       +6     
  Misses       4782     4782
Impacted Files Coverage Δ
satpy/tests/test_readers.py 98.54% <100%> (+0.02%) ⬆️
satpy/tests/reader_tests/test_hdf5_utils.py 92.64% <100%> (+0.1%) ⬆️
satpy/readers/yaml_reader.py 88.02% <100%> (ø) ⬆️

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 2f45b54...3ad0503. Read the comment docs.

@djhoese
Copy link
Member

djhoese commented Oct 9, 2018

Wow is that really all that is needed? Nice.

Would you mind adding a simple unit test? I'm guessing you'll have to add something to check if pathlib is available and skip the test if not (python 2).

@honnorat
Copy link
Contributor Author

honnorat commented Oct 9, 2018

I hope this is enough, I don't know where to test elsewhere.

Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

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

I made a small change to how the test is skipped, but otherwise it looks good. One question, since you had to change the fake hdf5 handler to make the test work, does this mean that the base file handler (satpy/readers/file_handlers.py) might also need to be updated? What readers have you tried this with?

@djhoese djhoese merged commit 38fb064 into pytroll:master Oct 9, 2018
@mraspaud mraspaud added enhancement code enhancements, features, improvements component:scene labels Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:scene enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow readers to accept pathlib.Path instances
4 participants