radio-astro-tools / spectral-cube

Library for reading and analyzing astrophysical spectral data cubes
http://spectral-cube.rtfd.org
BSD 3-Clause "New" or "Revised" License
95 stars 61 forks source link

Small fix: don't check meta if it's None #871

Closed keflavich closed 1 year ago

keflavich commented 1 year ago

Could get errors like:

    if 'beam' in self.meta:
TypeError: argument of type 'NoneType' is not iterable

before this

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +2.51 :tada:

Comparison is base (d004d79) 77.36% compared to head (0dfbf78) 79.88%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #871 +/- ## ========================================== + Coverage 77.36% 79.88% +2.51% ========================================== Files 24 24 Lines 6027 6035 +8 ========================================== + Hits 4663 4821 +158 + Misses 1364 1214 -150 ``` | [Impacted Files](https://codecov.io/gh/radio-astro-tools/spectral-cube/pull/871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools) | Coverage Δ | | |---|---|---| | [spectral\_cube/lower\_dimensional\_structures.py](https://codecov.io/gh/radio-astro-tools/spectral-cube/pull/871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools#diff-c3BlY3RyYWxfY3ViZS9sb3dlcl9kaW1lbnNpb25hbF9zdHJ1Y3R1cmVzLnB5) | `84.70% <100.00%> (+4.00%)` | :arrow_up: | ... and [6 files with indirect coverage changes](https://codecov.io/gh/radio-astro-tools/spectral-cube/pull/871/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.