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 bug in dep tree when modifier deps are modified wavelengths #229

Merged
merged 1 commit into from
Mar 17, 2018

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Mar 17, 2018

This PR fixes a bug I encountered when trying to add rayleigh correction to the ABI natural composite. The default rayleigh corrector/modifier in visir.yaml depends on a sunz_corrected 0.67 band. This is C02 for ABI. C02 is also needed to make the natural RGB and is specified by name.

Before this PR these dependencies would show up in the dependency tree as two separate nodes. One as the 0.67 modified key, one as the C02 modified key. From what I can tell this happens because when the dep tree checks if C02 is in the dep tree it thinks it isn't there, but it is actually there as the 0.67 dependency. The key for the 0.67 dependency is never "filled in" with the details of it's unmodified dataset (name, resolution, calibration, etc). This PR fixes this. I think I had this behavior implemented in the past but removed it for some reason. Tests pass, so I don't know.

This bug comes up semi-randomly based on the order that dependencies are loaded/processed.

P.S. I thought I'd start making PRs from my own fork instead of the satpy one. Maintainers should still have push permissions to my branch through this PR. This follows how I've seen other projects do it where they only have a master branch instead of a develop/master branch pair.

  • Tests added
  • Tests passed
  • Passes git diff origin/develop **/*py | flake8 --diff

@djhoese djhoese added bug component:dep_tree Dependency tree and dataset loading labels Mar 17, 2018
@djhoese djhoese added this to the v0.9 milestone Mar 17, 2018
@djhoese djhoese self-assigned this Mar 17, 2018
@djhoese djhoese requested a review from mraspaud March 17, 2018 15:41
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 60.802% when pulling a948947 on davidh-ssec:bugfix-mod-with-wl-dep into 547819c on pytroll:develop.

1 similar comment
@coveralls
Copy link

coveralls commented Mar 17, 2018

Coverage Status

Coverage increased (+0.1%) to 60.802% when pulling a948947 on davidh-ssec:bugfix-mod-with-wl-dep into 547819c on pytroll:develop.

@djhoese djhoese merged commit f19ae9b into pytroll:develop Mar 17, 2018
@djhoese djhoese deleted the bugfix-mod-with-wl-dep branch March 17, 2018 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:dep_tree Dependency tree and dataset loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants