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

Added crop functionality to trollflow2 #210

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Vpirm9
Copy link

@Vpirm9 Vpirm9 commented Aug 23, 2024

An addition for using the scene.crop() functionality from satpy has been added to trollflow2. It can be called in the trollflow2.yamlfile with- fun: !!python/name:trollflow2.plugins.crop. This functionality was implemented because I was tasked with cropping geostationary data and saving it to the local archive. The aim of this approach was to preserve the data in its original form while reducing overall storage space by retaining only the data over the region of interest.

The crop() function was added, which uses the same output job["resampled_scenes"] as `resample(), so they cannot be used simultaneously. However, no situations have been identified where using both functions at the same time would be necessary.

  • Closes #xxxx
  • Tests added
  • Tests passed
  • Passes flake8 trollflow2
  • Fully documented
  • Add your name to AUTHORS.md if not there already

@Vpirm9 Vpirm9 requested review from pnuu and mraspaud as code owners August 23, 2024 10:16
Copy link
Member

@pnuu pnuu left a comment

Choose a reason for hiding this comment

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

Could you add some unit tests for the new feature? Also add documentation for the new plugin to doc/source/plugins.rst.

@pnuu pnuu added the enhancement New feature or request label Sep 10, 2024
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 8.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 95.43%. Comparing base (b72a3f5) to head (34ddb14).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
trollflow2/plugins/__init__.py 8.33% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
- Coverage   95.78%   95.43%   -0.35%     
==========================================
  Files          12       12              
  Lines        2989     3001      +12     
==========================================
+ Hits         2863     2864       +1     
- Misses        126      137      +11     
Flag Coverage Δ
unittests 95.43% <8.33%> (-0.35%) ⬇️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants