Skip to content

Commit

Permalink
update to require pyuvdata>=2.4.1 for recarray uvparameter support
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Oct 15, 2023
1 parent 176f4ff commit 44ab42c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

### Changed
- Updated the pyuvdata requirement to >= 2.4.1

## [0.3.0] - 2023-04-10

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Required:
* h5py>=3.1
* numpy>=1.20
* scipy>=1.3
* pyuvdata>=2.2.10
* pyuvdata>=2.4.1
* setuptools_scm>=7.0.3

Optional:
Expand Down
2 changes: 1 addition & 1 deletion ci/full_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- numpy>=1.20
- pip
- pytest-cov
- pyuvdata>=2.2.10
- pyuvdata>=2.4.1
- scipy>=1.3
- setuptools_scm>=7.0.3
- pip:
Expand Down
2 changes: 1 addition & 1 deletion ci/min_deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- numpy>=1.20
- pytest
- pytest-cov
- pyuvdata>=2.2.10
- pyuvdata>=2.4.1
- scipy>=1.3
- setuptools_scm>=7.0.3
- pip
2 changes: 1 addition & 1 deletion ci/min_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- coverage
- pytest-cov
- setuptools_scm==7.0.3
- pyuvdata==2.2.10
- pyuvdata==2.4.1
- pip
- pip:
- lunarsky==0.2.1
2 changes: 1 addition & 1 deletion ci/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- h5py>=3.0
- numpy>=1.20
- pip
- pyuvdata>=2.2.10
- pyuvdata>=2.4.1
- scipy>=1.3
- setuptools_scm>=7.0.3
- pip:
Expand Down
3 changes: 1 addition & 2 deletions environment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: pyradiosky
channels:
- conda-forge
- defaults
dependencies:
- astropy>=5.2
- astropy-healpix>=0.6
Expand All @@ -13,7 +12,7 @@ dependencies:
- pre-commit
- pypandoc
- pytest-cov
- pyuvdata>=2.2.10
- pyuvdata>=2.4.1
- pyyaml
- scipy>=1.3
- setuptools_scm>=7.0.3
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=30.3.0", "wheel", "setuptools_scm"]
requires = ["setuptools>=61", "wheel", "setuptools_scm>=7.0.3"]
build-backend = "setuptools.build_meta"

[tool.isort]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def branch_scheme(version):
"scipy>=1.3",
"astropy>=5.2",
"h5py>=3.1",
"pyuvdata>=2.2.10",
"pyuvdata>=2.4.1",
"setuptools_scm>=7.0.3",
],
"extras_require": {
Expand Down
36 changes: 10 additions & 26 deletions src/pyradiosky/skymodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import astropy.units as units
import h5py
import numpy as np
import pyuvdata.utils as uvutils
import scipy.io
from astropy.coordinates import (
AltAz,
Expand All @@ -25,20 +26,11 @@
from astropy.io import votable
from astropy.time import Time
from astropy.units import Quantity
from pyuvdata.parameter import SkyCoordParameter, UVParameter
from pyuvdata.uvbase import UVBase
from pyuvdata.uvbeam.cst_beam import CSTBeam
from scipy.linalg import orthogonal_procrustes as ortho_procr

with warnings.catch_warnings():
# This filter can be removed when we require pyuvdata>=2.3
# is updated to use importlib.metadata rather than pkg_resources
warnings.filterwarnings(
"ignore", "Deprecated call to `pkg_resources.declare_namespace"
)
warnings.filterwarnings("ignore", "pkg_resources is deprecated as an API")
import pyuvdata.utils as uvutils
from pyuvdata.parameter import SkyCoordParameter, UVParameter
from pyuvdata.uvbase import UVBase
from pyuvdata.uvbeam.cst_beam import CSTBeam

from . import __version__
from . import spherical_coords_transforms as sct
from . import utils as skyutils
Expand Down Expand Up @@ -1279,20 +1271,12 @@ def __eq__(
):
"""Check for equality, check for future equality."""
# Run the basic __eq__ from UVBase
# the filters below should be removed when we require pyuvdata>=2.3
with warnings.catch_warnings():
try:
# The `silent` parameter was added in pyuvdata between 2.2.12 and 2.3
equal = super(SkyModel, self).__eq__(
other,
check_extra=check_extra,
allowed_failures=allowed_failures,
silent=silent,
)
except TypeError:
equal = super(SkyModel, self).__eq__(
other, check_extra=check_extra, allowed_failures=allowed_failures
)
equal = super(SkyModel, self).__eq__(
other,
check_extra=check_extra,
allowed_failures=allowed_failures,
silent=silent,
)

return equal

Expand Down

0 comments on commit 44ab42c

Please sign in to comment.