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 conversion of valid_range metadata to tuple in viirs_edr reader #2833

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jun 19, 2024

While testing viirs_edr with our upcoming release of Polar2Grid 3.1, @kathys noticed that the AWIPS tiled writer fails to handle valid_range metadata that is a numpy array. It assumes it is a tuple or something else boolean-able. I can't find any documentation in the Satpy documentation on this, but I'm fairly certain that we tend to recommend either removing metadata fields like valid_range or to convert them to tuples. This PR converts the viirs_edr reader's metadata to a tuple for valid_range and now writing to AWIPS tiled files works as expected.

  • Closes #xxxx
  • Tests added
  • Fully documented

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.94%. Comparing base (8bcd427) to head (aff4f31).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2833   +/-   ##
=======================================
  Coverage   95.94%   95.94%           
=======================================
  Files         366      366           
  Lines       53504    53522   +18     
=======================================
+ Hits        51332    51350   +18     
  Misses       2172     2172           
Flag Coverage Δ
behaviourtests 4.04% <0.00%> (-0.01%) ⬇️
unittests 96.03% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

coveralls commented Jun 19, 2024

Pull Request Test Coverage Report for Build 9586294239

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 30 of 30 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.041%

Totals Coverage Status
Change from base Build 9520945640: 0.001%
Covered Lines: 51579
Relevant Lines: 53705

💛 - Coveralls

@djhoese djhoese merged commit 9d5d7ef into pytroll:main Jun 26, 2024
18 of 19 checks passed
@djhoese djhoese deleted the bugfix-viirsedr-valid-range branch June 26, 2024 19:33
@djhoese
Copy link
Member Author

djhoese commented Jun 26, 2024

I need this pull request for my work. Since everyone is going on vacation, I'm going to flex my github permission muscles and push this through. The overall fix is pretty simple, but we should probably have a larger discussion about the "standard practice" being utilized here.

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