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 cf write-read roundtrip #2176

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Aug 15, 2022

This PR fixes the sensor reading from satpy-written cf files.

@codecov
Copy link

codecov bot commented Aug 15, 2022

Codecov Report

Merging #2176 (66fc9ac) into main (768524f) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2176      +/-   ##
==========================================
+ Coverage   93.99%   94.04%   +0.04%     
==========================================
  Files         287      290       +3     
  Lines       44092    44563     +471     
==========================================
+ Hits        41446    41911     +465     
- Misses       2646     2652       +6     
Flag Coverage Δ
behaviourtests 4.73% <0.00%> (-0.06%) ⬇️
unittests 94.71% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/tests/reader_tests/test_viirs_compact.py 100.00% <ø> (ø)
satpy/readers/satpy_cf_nc.py 97.80% <100.00%> (+0.04%) ⬆️
satpy/tests/test_cf_roundtrip.py 100.00% <100.00%> (ø)
satpy/readers/ici_l1b_nc.py 94.88% <0.00%> (ø)
satpy/tests/reader_tests/test_ici_l1b_nc.py 100.00% <0.00%> (ø)
satpy/writers/cf_writer.py 94.61% <0.00%> (+0.25%) ⬆️
satpy/readers/viirs_compact.py 77.56% <0.00%> (+1.52%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

The fix looks good to me. Did you mean to commit the viirs compact tests refactor?

Can the new CF test please be added to the reader tests? If I'm working on the reader or writer I'm not going to think to look in this completely separate module for a test. Granted it will fail when all the tests are run either way, but that will happen if it is in the reader tests too.

Comment on lines +1 to +2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Copy link
Member

Choose a reason for hiding this comment

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

Do we maybe want to start not including these in new modules given the conversation in pyresample with @gerritholl?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 94.656% when pulling 66fc9ac on mraspaud:fix-instrument-cf-writer into 589f087 on pytroll:main.

@mraspaud
Copy link
Member Author

Yes the viirs compact refractor is to create the fixtures that we then use in the round-trip test.

@djhoese
Copy link
Member

djhoese commented Aug 29, 2022

Can the new CF test please be added to the reader tests? If I'm working on the reader or writer I'm not going to think to look in this completely separate module for a test. Granted it will fail when all the tests are run either way, but that will happen if it is in the reader tests too.

@mraspaud what were you thoughts on this comment of mine? Any time to work on it this week? This should then make @BENR0's #1695 clearer.

@mraspaud
Copy link
Member Author

Yes, I'm looking at it right now.

@mraspaud
Copy link
Member Author

As per the conversation on slack, @djhoese is good with leaving the roundtrip test in its own module.

@mraspaud mraspaud merged commit ff54a74 into pytroll:main Aug 29, 2022
@mraspaud mraspaud deleted the fix-instrument-cf-writer branch August 29, 2022 12:58
@djhoese
Copy link
Member

djhoese commented Aug 29, 2022

@djhoese is good with leaving the roundtrip test in its own module.

For the record I'm not, but I don't want to waste people's time discussing it. In the grand scheme of things it isn't that big of a deal.

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.

satpy_cf_nc Reader Fails to Read Data Written by cf Writer
3 participants