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 geotiff writer being unimportable if gdal isn't installed #616

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Feb 14, 2019

The geotiff writer is deprecating its use of the 'gdal' python library. It is recommended (and has been for a long time) that trollimage is used with rasterio. The rasterio library only uses the C gdal library and not the python library. On some environments (conda) it is possible to have rasterio and not python gdal. The geotiff writer currently imports gdal regardless of rasterio existing so in this case you would be unable to use the geotiff writer at all even though you had all the necessary dependencies. This PR fixes that and raises an error if neither rasterio or gdal is importable.

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

@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #616 into master will decrease coverage by 0.02%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #616      +/-   ##
=========================================
- Coverage   78.33%   78.3%   -0.03%     
=========================================
  Files         136     136              
  Lines       19714   19722       +8     
=========================================
+ Hits        15442   15443       +1     
- Misses       4272    4279       +7
Impacted Files Coverage Δ
satpy/writers/geotiff.py 42.01% <36.36%> (-2.13%) ⬇️

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 f55d08a...baf5f42. Read the comment docs.

@djhoese djhoese merged commit 85758ba into pytroll:master Feb 14, 2019
@djhoese djhoese deleted the bugfix-geotiff-writer-import branch February 14, 2019 19:21
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 78.303% when pulling baf5f42 on djhoese:bugfix-geotiff-writer-import into f55d08a on pytroll:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants