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

Bugfix: __len__ test for beams #852

Closed keflavich closed 1 year ago

keflavich commented 1 year ago

If you write out a non-varying-spectral-resolution spectrum, it will try to load in as a VRS because the hasattr(beam, '__len__') check is true, even though there is no len.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (de97806) 77.36% compared to head (cdb2ebf) 77.36%.

: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 #852 +/- ## ======================================= Coverage 77.36% 77.36% ======================================= Files 24 24 Lines 6025 6027 +2 ======================================= + Hits 4661 4663 +2 Misses 1364 1364 ``` | [Impacted Files](https://codecov.io/gh/radio-astro-tools/spectral-cube/pull/852?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/852?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=radio-astro-tools#diff-c3BlY3RyYWxfY3ViZS9sb3dlcl9kaW1lbnNpb25hbF9zdHJ1Y3R1cmVzLnB5) | `80.69% <100.00%> (+0.07%)` | :arrow_up: | 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 at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

e-koch commented 1 year ago

Test failures are unrelated to this change. We'll fix in a separate PR (starting in #868)