Skip to content

Add more datasets to IASI L2 reader #3059

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

Merged
merged 9 commits into from
Mar 21, 2025

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Feb 12, 2025

This PR adds datasets from /INFO/ and /Maps/ groups to the IASI L2 reader.

Also the IASI L2 tests were converted to pytest.

  • Tests added

@pnuu pnuu added enhancement code enhancements, features, improvements component:readers cleanup Code cleanup but otherwise no change in functionality labels Feb 12, 2025
@pnuu pnuu self-assigned this Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 93.46405% with 20 lines in your changes missing coverage. Please review.

Project coverage is 96.15%. Comparing base (91e758a) to head (cc64efc).
Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
satpy/readers/hrit_base.py 57.14% 9 Missing ⚠️
satpy/readers/netcdf_utils.py 33.33% 8 Missing ⚠️
satpy/tests/reader_tests/test_iasi_l2.py 98.38% 2 Missing ⚠️
satpy/readers/iasi_l2.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3059      +/-   ##
==========================================
+ Coverage   96.11%   96.15%   +0.03%     
==========================================
  Files         383      383              
  Lines       55673    55822     +149     
==========================================
+ Hits        53511    53674     +163     
+ Misses       2162     2148      -14     
Flag Coverage Δ
behaviourtests 3.88% <0.98%> (-0.01%) ⬇️
unittests 96.24% <93.46%> (+0.03%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pnuu
Copy link
Member Author

pnuu commented Mar 5, 2025

Seems like bilinear resampling doesn't work with the current ("y", "x", "level") dimension order. If I change this to ("bands", "y", "x"). The nearest works also with the current ordering and naming, so the problem is within the bilinear resampler.

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.

My one small request that is not necessary would be rewriting most if not all of the test setup as a pytest fixture. You could have one that just produces the filename (Path object?) and is module scoped. Then have one that produces a Scene and one that produces a file handler (replaces self.reader) that are test scoped. That way any caching inside the Scene or file handler are not preserved between tests, but the test file is only created once.

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

@pnuu
Copy link
Member Author

pnuu commented Mar 20, 2025

I've now removed the test class and replaced the setup_method with fixtures. I tried adding scope="module" to test_data fixture, but Pytest complained with You tried to access the function scoped fixture tmp_path with a module scoped request object. so just removed the scoping and the tests now work (again).

@pnuu
Copy link
Member Author

pnuu commented Mar 20, 2025

Ok, found the scope="module" fix from the other PR, a added that in 4053955

@coveralls
Copy link

coveralls commented Mar 20, 2025

Pull Request Test Coverage Report for Build 13989982277

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

  • 153 of 156 (98.08%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 96.268%

Changes Missing Coverage Covered Lines Changed/Added Lines %
satpy/readers/iasi_l2.py 31 32 96.88%
satpy/tests/reader_tests/test_iasi_l2.py 122 124 98.39%
Totals Coverage Status
Change from base Build 13989672119: 0.003%
Covered Lines: 54175
Relevant Lines: 56275

💛 - Coveralls

@pnuu pnuu requested review from sfinkens and sjoro as code owners March 21, 2025 06:14
@pnuu pnuu force-pushed the feature-iasi-l2-info-and-maps-groups branch from cc64efc to 4053955 Compare March 21, 2025 10:43
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 f42ed0e into pytroll:main Mar 21, 2025
29 of 30 checks passed
@pnuu pnuu deleted the feature-iasi-l2-info-and-maps-groups branch March 21, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanup but otherwise no change in functionality component:readers enhancement code enhancements, features, improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants