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 usage when trollsched is not installed #223

Merged
merged 9 commits into from
Nov 18, 2024

Conversation

pnuu
Copy link
Member

@pnuu pnuu commented Nov 15, 2024

The check_valid_data_fraction() doesn't have a check whether pytroll-schedule is installed or not.

This PR adds the check, and makes the get_scene_coverage() helper function a private function to show it should not be called directly.

@pnuu pnuu added bug Something isn't working enhancement New feature or request labels Nov 15, 2024
@pnuu pnuu requested a review from gerritholl November 15, 2024 08:31
@pnuu pnuu self-assigned this Nov 15, 2024
@pnuu pnuu requested a review from mraspaud as a code owner November 15, 2024 08:31
@pnuu pnuu changed the title Fix trollsched usage when not installed Fix usage when trollsched is not installed Nov 15, 2024
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.99%. Comparing base (e0d795e) to head (49bafdc).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
+ Coverage   95.96%   95.99%   +0.02%     
==========================================
  Files          14       14              
  Lines        3272     3293      +21     
==========================================
+ Hits         3140     3161      +21     
  Misses        132      132              
Flag Coverage Δ
unittests 95.99% <100.00%> (+0.02%) ⬆️

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.

Copy link
Member

@gerritholl gerritholl left a comment

Choose a reason for hiding this comment

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

Please add a unit test for the added lines if possible.

trollflow2/plugins/__init__.py Show resolved Hide resolved
gerritholl
gerritholl previously approved these changes Nov 15, 2024
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! thanks for fixing this check and making the code better along the way!

@mraspaud mraspaud merged commit c57635b into pytroll:main Nov 18, 2024
9 checks passed
@pnuu pnuu deleted the fix-trollsched-usage-when-not-installed branch November 18, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

The check_valid_data_fraction plugin does not check for pytroll-schedule availability
4 participants