Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "TST: Ignore ASDF warning about gwcs-1.0.0 schema" #2463

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions jdaviz/configs/imviz/tests/test_astrowidgets_api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import os
import warnings

import asdf
import numpy as np
import pytest
from asdf.exceptions import AsdfWarning
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.nddata import NDData
Expand Down Expand Up @@ -355,11 +353,8 @@ def test_mvp_markers(self):
def test_markers_gwcs_lonlat(imviz_helper):
"""GWCS uses Lon/Lat for ICRS."""
gw_file = get_pkg_data_filename('data/miri_i2d_lonlat_gwcs.asdf')
with warnings.catch_warnings():
# https://github.com/spacetelescope/jdaviz/issues/2446
warnings.filterwarnings("ignore", category=AsdfWarning)
with asdf.open(gw_file) as af:
gw = af.tree['wcs']
with asdf.open(gw_file) as af:
gw = af.tree['wcs']
ndd = NDData(np.ones((10, 10), dtype=np.float32), wcs=gw, unit='MJy/sr')
imviz_helper.load_data(ndd, data_label='MIRI_i2d')
assert imviz_helper.app.data_collection[0].label == 'MIRI_i2d[DATA]'
Expand Down
12 changes: 2 additions & 10 deletions jdaviz/configs/mosviz/tests/test_parsers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import warnings
from zipfile import ZipFile

import pytest
from numpy.testing import assert_allclose
from asdf.exceptions import AsdfWarning
from astropy.utils.data import download_file

from jdaviz.utils import PRIHDR_KEY, COMMENTCARD_KEY
Expand Down Expand Up @@ -99,10 +97,7 @@ def test_nirspec_level2_parser(mosviz_helper, tmp_path):
level3_path = tmp_path / 'jw02756001001_03103_00003_nrs1'

data_dir = level3_path
with warnings.catch_warnings():
# https://github.com/spacetelescope/jdaviz/issues/2446
warnings.filterwarnings("ignore", category=AsdfWarning)
mosviz_helper.load_data(directory=data_dir, instrument='nirspec')
mosviz_helper.load_data(directory=data_dir, instrument='nirspec')

assert len(mosviz_helper.app.data_collection) == 75

Expand Down Expand Up @@ -130,10 +125,7 @@ def test_niriss_parser(mosviz_helper, tmp_path):
with ZipFile(fn, 'r') as sample_data_zip:
sample_data_zip.extractall(tmp_path)

with warnings.catch_warnings():
# https://github.com/spacetelescope/jdaviz/issues/2446
warnings.filterwarnings("ignore", category=AsdfWarning)
mosviz_helper.load_data(directory=tmp_path, instrument="niriss")
mosviz_helper.load_data(directory=tmp_path, instrument="niriss")
assert len(mosviz_helper.app.data_collection) == 10

# The MOS Table should be first in the data collection
Expand Down