satpy icon indicating copy to clipboard operation
satpy copied to clipboard

Refactor `_resampled_scene()` and `_reduce_data()` methods of the `Scene` class

Open pnuu opened this issue 5 months ago • 4 comments

This PR refactors Scene._resampled_scene() that @gerritholl reported to be complicated in https://github.com/pytroll/satpy/pull/3168#issuecomment-3109062005 . As there was a change to _reduce_data(), I did some additional refactoring to it too.

  • [ ] Closes #xxxx
  • [ ] Tests added
  • [ ] Fully documented
  • [ ] Add your name to AUTHORS.md if not there already

pnuu avatar Jul 28 '25 08:07 pnuu

Codecov Report

:x: Patch coverage is 91.07143% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 96.28%. Comparing base (5cc91a2) to head (2d8d883). :warning: Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
satpy/scene.py 91.07% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3178      +/-   ##
==========================================
- Coverage   96.28%   96.28%   -0.01%     
==========================================
  Files         436      436              
  Lines       57830    57940     +110     
==========================================
+ Hits        55681    55785     +104     
- Misses       2149     2155       +6     
Flag Coverage Δ
behaviourtests 3.78% <17.85%> (+<0.01%) :arrow_up:
unittests 96.37% <91.07%> (-0.01%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jul 28 '25 08:07 codecov[bot]

I'll do some more refactoring to _reduce_data().

pnuu avatar Jul 28 '25 08:07 pnuu

Pull Request Test Coverage Report for Build 16566762203

Details

  • 51 of 56 (91.07%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.381%

Changes Missing Coverage Covered Lines Changed/Added Lines %
satpy/scene.py 51 56 91.07%
<!-- Total: 51 56
Totals Coverage Status
Change from base Build 16528353281: 0.0%
Covered Lines: 56082
Relevant Lines: 58188

💛 - Coveralls

coveralls avatar Jul 28 '25 08:07 coveralls

Thanks! I've merged this into #3168 but there is still an issue with missing test coverage.

gerritholl avatar Jul 29 '25 15:07 gerritholl