From 44ab42cb667378e21f6ab2976b1cae4d8191d55d Mon Sep 17 00:00:00 2001 From: Bryna Hazelton Date: Sun, 15 Oct 2023 15:02:25 -0700 Subject: [PATCH] update to require pyuvdata>=2.4.1 for recarray uvparameter support --- CHANGELOG.md | 3 +++ README.md | 2 +- ci/full_deps.yaml | 2 +- ci/min_deps.yaml | 2 +- ci/min_versions.yaml | 2 +- ci/publish.yaml | 2 +- environment.yaml | 3 +-- pyproject.toml | 2 +- setup.py | 2 +- src/pyradiosky/skymodel.py | 36 ++++++++++-------------------------- 10 files changed, 21 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc2bb53..dce747ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +### Changed +- Updated the pyuvdata requirement to >= 2.4.1 + ## [0.3.0] - 2023-04-10 ### Added diff --git a/README.md b/README.md index 7363f00d..5cd97ad5 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/ci/full_deps.yaml b/ci/full_deps.yaml index 3e717d77..70792c83 100644 --- a/ci/full_deps.yaml +++ b/ci/full_deps.yaml @@ -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: diff --git a/ci/min_deps.yaml b/ci/min_deps.yaml index ec6270b6..0b3c38b0 100644 --- a/ci/min_deps.yaml +++ b/ci/min_deps.yaml @@ -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 diff --git a/ci/min_versions.yaml b/ci/min_versions.yaml index 8156dba3..770dd9d7 100644 --- a/ci/min_versions.yaml +++ b/ci/min_versions.yaml @@ -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 diff --git a/ci/publish.yaml b/ci/publish.yaml index 31a992e6..97e613e3 100644 --- a/ci/publish.yaml +++ b/ci/publish.yaml @@ -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: diff --git a/environment.yaml b/environment.yaml index 6a6b58fb..fa1568f7 100644 --- a/environment.yaml +++ b/environment.yaml @@ -1,7 +1,6 @@ name: pyradiosky channels: - conda-forge - - defaults dependencies: - astropy>=5.2 - astropy-healpix>=0.6 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 65303dda..4053dff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/setup.py b/setup.py index 46b939c4..966b4eca 100644 --- a/setup.py +++ b/setup.py @@ -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": { diff --git a/src/pyradiosky/skymodel.py b/src/pyradiosky/skymodel.py index c943c29f..ea6d5a48 100644 --- a/src/pyradiosky/skymodel.py +++ b/src/pyradiosky/skymodel.py @@ -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, @@ -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 @@ -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