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 DifferenceCompositor not using metadata from YAML #2054

Merged
merged 1 commit into from Mar 11, 2022

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Mar 11, 2022

Found out the standard_name: I was assigning in the YAML wasn't being assigned.

  • Closes #xxxx
  • Tests added

comp = DifferenceCompositor(name='diff')
res = comp((self.ds1, self.ds2), standard_name='temperature_difference')
comp = DifferenceCompositor(name='diff', standard_name='temperature_difference')
res = comp((self.ds1, self.ds2))
Copy link
Member Author

Choose a reason for hiding this comment

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

This test was incorrect. Passing standard_name to the __call__ method of a compositor will never happen. Only the Scene calls __call__ and it passed the DataID properties computed during dependency decisions. The __init__ method is when metadata from the YAML are passed.

@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #2054 (f00d025) into main (a61e08e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2054   +/-   ##
=======================================
  Coverage   93.79%   93.79%           
=======================================
  Files         282      282           
  Lines       42170    42171    +1     
=======================================
+ Hits        39554    39555    +1     
  Misses       2616     2616           
Flag Coverage Δ
behaviourtests 4.74% <0.00%> (-0.01%) ⬇️
unittests 94.33% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
satpy/composites/__init__.py 89.92% <100.00%> (+0.01%) ⬆️
satpy/tests/test_composites.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a61e08e...f00d025. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0001%) to 94.275% when pulling f00d025 on djhoese:bugfix-diffcomp-attrs into a61e08e on pytroll:main.

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

@djhoese djhoese merged commit 01902ba into pytroll:main Mar 11, 2022
@djhoese djhoese deleted the bugfix-diffcomp-attrs branch March 11, 2022 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants