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 'get_filename' call in 'ninjo' writer #520

Merged
merged 2 commits into from
Nov 27, 2018
Merged

Fix 'get_filename' call in 'ninjo' writer #520

merged 2 commits into from
Nov 27, 2018

Conversation

loreclem
Copy link
Contributor

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

@@ -49,5 +49,5 @@ def save_image(self, img, filename=None, **kwargs): # floating_point=False,

.. _ninjotiff: http://www.ssec.wisc.edu/~davidh/polar2grid/misc/NinJo_Satellite_Import_Formats.html
"""
filename = filename or self.get_filename(**img.info)
filename = filename or self.get_filename()
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be **img.attrs?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry:

filename = filename or self.get_filename(**img.data.attrs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are right, I have just tested it. I update this PR right away, thanks for checking.

@coveralls
Copy link

coveralls commented Nov 26, 2018

Coverage Status

Coverage decreased (-0.02%) to 74.599% when pulling d4fad49 on loreclem:master into 6e5ec68 on pytroll:master.

@codecov
Copy link

codecov bot commented Nov 26, 2018

Codecov Report

Merging #520 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #520   +/-   ##
=======================================
  Coverage   74.62%   74.62%           
=======================================
  Files         136      136           
  Lines       18342    18342           
=======================================
  Hits        13687    13687           
  Misses       4655     4655
Impacted Files Coverage Δ
satpy/writers/ninjotiff.py 18.75% <0%> (ø) ⬆️

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 6e5ec68...d4fad49. Read the comment docs.

@mraspaud mraspaud added the PCW Pytroll Contributors' Week label Nov 27, 2018
@mraspaud
Copy link
Member

Can we merge this @loreclem ?

@djhoese djhoese changed the title [PCW] Adapted get_filename call. Fix 'get_filename' call in 'ninjo' writer Nov 27, 2018
@loreclem
Copy link
Contributor Author

I would say so, David approved it too.

@mraspaud mraspaud merged commit 17b88e4 into pytroll:master Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PCW Pytroll Contributors' Week
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants