-
Notifications
You must be signed in to change notification settings - Fork 300
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 optional modifier dependencies being unloaded for delayed composites #754
Conversation
Codecov Report
@@ Coverage Diff @@
## master #754 +/- ##
=========================================
+ Coverage 80.68% 80.7% +0.01%
=========================================
Files 149 149
Lines 21650 21677 +27
=========================================
+ Hits 17469 17495 +26
- Misses 4181 4182 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple cosmetic changes
satpy/scene.py
Outdated
@@ -765,7 +771,9 @@ def _get_prereq_datasets(self, comp_id, prereq_nodes, keepables, skip=False): | |||
LOG.debug("Delaying generation of %s because of dependency's delayed generation: %s", comp_id, prereq_id) | |||
if not skip: | |||
LOG.debug("Missing prerequisite for '{}': '{}'".format(comp_id, prereq_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, the prerequisite isn't missing, it is delayed. Could we modify the debug message to differentiate from where the prereq is actually missing ?
satpy/scene.py
Outdated
@@ -788,12 +796,20 @@ def _generate_composite(self, comp_node, keepables): | |||
compositor, prereqs, optional_prereqs = comp_node.data | |||
|
|||
try: | |||
missing_prereq = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here again, I would use 'missing', maybe delayed_prereq
?
I noticed this while working with MERSI-2 data where some resolutions and modifiers didn't work out as desired and required composites to be delayed until after resampling. The basic idea is:
The issue is that in step 3 we aren't processing optional dependencies so they are never marked as "keepable". This results in optional dependencies being removed and not being available when the composite's generation is re-attempted after resampling.
git diff origin/master -- "*py" | flake8 --diff