From f82e089f5e28dc1dc5e9d08271409283b6e1ebe9 Mon Sep 17 00:00:00 2001 From: Bryna Hazelton Date: Mon, 25 Mar 2024 14:50:38 -0700 Subject: [PATCH] handle another SPICE error, update codecov.yml for new version --- .codecov.yml | 3 +-- pyuvdata/tests/test_utils.py | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.codecov.yml b/.codecov.yml index 4225f0980f..4b2ec37ff6 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,4 +1,3 @@ codecov: ci: - - !travis-ci # ignore CI builds by Travis - - !azure-pipelines # ignore CI builds by azure pipelines + - "!azure-pipelines" # ignore CI builds by azure pipelines diff --git a/pyuvdata/tests/test_utils.py b/pyuvdata/tests/test_utils.py index 90bd430d92..19482a847b 100644 --- a/pyuvdata/tests/test_utils.py +++ b/pyuvdata/tests/test_utils.py @@ -4516,16 +4516,21 @@ def test_uvw_track_generator(flip_u, use_uvw, use_earthloc): @pytest.mark.parametrize("selenoid", ["SPHERE", "GSFC", "GRAIL23", "CE-1-LAM-GEO"]) def test_uvw_track_generator_moon(selenoid): # Note this isn't a particularly deep test, but it at least exercises the code. - gen_results = uvutils.uvw_track_generator( - lon_coord=0.0, - lat_coord=0.0, - coord_frame="icrs", - telescope_loc=(0, 0, 0), - time_array=2456789.0, - antenna_positions=np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), - telescope_frame="mcmf", - ellipsoid=selenoid, - ) + from spiceypy.utils.exceptions import SpiceUNKNOWNFRAME + + try: + gen_results = uvutils.uvw_track_generator( + lon_coord=0.0, + lat_coord=0.0, + coord_frame="icrs", + telescope_loc=(0, 0, 0), + time_array=2456789.0, + antenna_positions=np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), + telescope_frame="mcmf", + ellipsoid=selenoid, + ) + except SpiceUNKNOWNFRAME as err: + pytest.skip("SpiceUNKNOWNFRAME error: " + str(err)) # Check that the total lengths all match 1 assert np.allclose((gen_results["uvw"] ** 2.0).sum(1), 2.0)