RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
42 stars 7 forks source link

Fix tests broken by recent pyuvdata changes #416

Closed bhazelton closed 1 year ago

bhazelton commented 1 year ago

Description

Fix various tests that were broken by recent changes in pyuvdata and new astropy deprecation warnings.

Also fixes some things that will break with some upcoming pyuvdata PRs.

Motivation and Context

Types of changes

Checklist:

For all pull requests:

Bug fix checklist:

codecov[bot] commented 1 year ago

Codecov Report

Base: 99.48% // Head: 99.13% // Decreases project coverage by -0.36% :warning:

Coverage data is based on head (41a11ed) compared to base (254215d). Patch coverage: 92.50% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #416 +/- ## ========================================== - Coverage 99.48% 99.13% -0.36% ========================================== Files 12 13 +1 Lines 2153 2197 +44 ========================================== + Hits 2142 2178 +36 - Misses 11 19 +8 ``` | [Impacted Files](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup) | Coverage Δ | | |---|---|---| | [pyuvsim/utils.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS91dGlscy5weQ==) | `98.10% <ø> (-0.06%)` | :arrow_down: | | [pyuvsim/simsetup.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS9zaW1zZXR1cC5weQ==) | `99.38% <81.48%> (-0.52%)` | :arrow_down: | | [pyuvsim/antenna.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS9hbnRlbm5hLnB5) | `94.44% <88.88%> (-1.71%)` | :arrow_down: | | [pyuvsim/analyticbeam.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS9hbmFseXRpY2JlYW0ucHk=) | `100.00% <100.00%> (ø)` | | | [pyuvsim/telescope.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS90ZWxlc2NvcGUucHk=) | `100.00% <100.00%> (ø)` | | | [pyuvsim/uvsim.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS91dnNpbS5weQ==) | `99.72% <100.00%> (+0.28%)` | :arrow_up: | | [pyuvsim/\_\_init\_\_.py](https://codecov.io/gh/RadioAstronomySoftwareGroup/pyuvsim/pull/416?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RadioAstronomySoftwareGroup#diff-cHl1dnNpbS9fX2luaXRfXy5weQ==) | `81.25% <0.00%> (ø)` | | 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=RadioAstronomySoftwareGroup). 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=RadioAstronomySoftwareGroup)

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

bhazelton commented 1 year ago

The missing coverage in antenna.py & simsetup.py will be fixed when the next pyuvdata version is released.

steven-murray commented 1 year ago

@bhazelton should I wait until that version is out before re-reviewing?

bhazelton commented 1 year ago

@steven-murray no, I'd rather not because then we'll have a period, even if it's short, where pyuvsim doesn't work with the newest pyuvdata. I could add pragmas to exclude those lines from coverage, but it feels a bit silly. I'd rather just take the coverage hit for a little while. This PR explicitly works with both the older and the newer versions, it's just that code specific to the newer versions isn't being hit because we install pyuvdata from conda not from the repo.