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 SEVIRI native reader failing when missing main header #2516

Merged
merged 3 commits into from Jun 21, 2023

Conversation

ameraner
Copy link
Member

This PR fixes a bug introduced by #2198 (cc @simonrp84 ) that causes the SEVIRI reader to fail for files that do not have a 15_MAIN_PRODUCT_HEADER -this header is read, optionally, here:

if with_archive_header:
record += [
('15_MAIN_PRODUCT_HEADER', L15MainProductHeaderRecord().get()),

Files that do not contain the archive header were missing the 15_MAIN_PRODUCT_HEADER, which was causing a KeyError.

After this PR, an info log message is issued specifying that the quality check could not be performed in case of the missing header.

  • Tests added

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #2516 (7432312) into main (9415ad9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2516   +/-   ##
=======================================
  Coverage   94.85%   94.85%           
=======================================
  Files         337      337           
  Lines       49624    49643   +19     
=======================================
+ Hits        47069    47088   +19     
  Misses       2555     2555           
Flag Coverage Δ
behaviourtests 4.41% <0.00%> (-0.01%) ⬇️
unittests 95.47% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
satpy/readers/seviri_l1b_native.py 86.82% <100.00%> (+0.06%) ⬆️
satpy/tests/reader_tests/test_seviri_l1b_native.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5336249345

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

Totals Coverage Status
Change from base Build 5323400933: 0.001%
Covered Lines: 47201
Relevant Lines: 49466

💛 - Coveralls

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

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

LGTM

@mraspaud mraspaud merged commit 55c414e into pytroll:main Jun 21, 2023
17 of 19 checks passed
@ameraner ameraner deleted the fix_native_header branch April 17, 2024 15:35
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

4 participants