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 writers to create output directories if they don't exist #478

Merged
merged 3 commits into from Oct 30, 2018

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Oct 29, 2018

If a user specifies a directory in their filename pattern it is not currently created which will causes errors in most readers. Example:

    scn.save_datasets(filename='{start_time:%Y%m%d}/{name}_{start_time:%Y%m%d_%H%M%S}.tif')

Which should create a 20180101 directory and put a C01_20180101_120000.tif file in it.

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff
  • Fully documented

@djhoese djhoese added enhancement code enhancements, features, improvements component:writers labels Oct 29, 2018
@djhoese djhoese self-assigned this Oct 29, 2018
@djhoese djhoese requested a review from mraspaud October 29, 2018 20:38
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 74.16% when pulling f90ac1e on djhoese:bugfix-output-dir-creation into e2a3ac7 on pytroll:master.

@coveralls
Copy link

coveralls commented Oct 29, 2018

Coverage Status

Coverage increased (+0.05%) to 74.156% when pulling 84195be on djhoese:bugfix-output-dir-creation into 82d7cbc on pytroll:master.

@codecov
Copy link

codecov bot commented Oct 29, 2018

Codecov Report

Merging #478 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #478   +/-   ##
======================================
  Coverage    74.1%   74.1%           
======================================
  Files         136     136           
  Lines       18036   18036           
======================================
  Hits        13366   13366           
  Misses       4670    4670

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 82d7cbc...84195be. Read the comment docs.

@djhoese djhoese mentioned this pull request Oct 29, 2018
@djhoese djhoese changed the title Bugfix output dir creation Allow writers to create output directories if they don't exist Oct 30, 2018
@djhoese djhoese merged commit 7c8cdc4 into pytroll:master Oct 30, 2018
@djhoese djhoese deleted the bugfix-output-dir-creation branch October 30, 2018 01:16
@djhoese
Copy link
Member Author

djhoese commented Oct 30, 2018

@mraspaud I asked for you to review this PR but wanted to merge it as soon as possible because I wanted to see if my small change to setup.py fixes the readthedocs build. Feel free to still comment on anything you disagree with and I'll fix it tomorrow.

@djhoese
Copy link
Member Author

djhoese commented Oct 30, 2018

It did fix readthedocs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:writers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants