-
Notifications
You must be signed in to change notification settings - Fork 290
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 Scene.available_composite_names showing unavailable composites #921
Conversation
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.
Just few comments.
I have tested the PR, it works as I expected now. Thanks. |
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.
I'm still struggling with this part of the code, but these changes make it more clear and thanks to all the new docstrings it is easier to understand now! 👍
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.
Quickly tested with modis data, nothing bad to report. LGTM.
This fixes an issue where
Scene.available_composite_names
would list composites that had missing dependencies. This has been happening for a long time apparently. So long that I don't even know how the previous code ever worked. @yufeizhu600 first pointed this out in #853 and if he could test this it would be much appreciated.This PR mainly affects:
I've marked this as backwards-incompatible because I had to remove some functionality (kwargs) that didn't actually do anything useful and removed some functionality that I though would rarely be used. Mainly filtering what composites are shown by specifying what reader or sensors the compositors were based on or configured for. This is an unlikely use case so I made it so these keyword arguments can not be passed to the above mentioned methods.
The "available" methods now return the right composites from what I can tell. What might be surprising to some users is that
all
now returns less composites than it did before. That's because it is now checking that it actually knows about the dependencies required for a composite rather than just listing all configured composites. So if a generic Vis/IR composite asks for 11.0um band but the reader we are using will never have that band then that composite is not shown inall_composite_ids
(oravailable_composite_ids
either); previously it was.flake8 satpy