From 22bfbc0084419e99ca9724f147182e010a0749ca Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:19:02 -0500 Subject: [PATCH] To test out spacetelescope/gwcs#526 --- jdaviz/app.py | 6 +----- jdaviz/configs/mosviz/tests/test_parsers.py | 7 +------ tox.ini | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/jdaviz/app.py b/jdaviz/app.py index 4f82b93b69..bf0db8ca1d 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -847,11 +847,7 @@ def load_data(self, file_obj, parser_reference=None, **kwargs): parser = data_parser_registry.members.get(data_parser) if parser is not None: - with warnings.catch_warnings(): - # https://github.com/spacetelescope/gwcs/pull/522 - warnings.filterwarnings( - "ignore", message="The bounding_box was set in C order.*") - parser(self, file_obj, **kwargs) + parser(self, file_obj, **kwargs) else: self._application_handler.load_data(file_obj) diff --git a/jdaviz/configs/mosviz/tests/test_parsers.py b/jdaviz/configs/mosviz/tests/test_parsers.py index 10ccb2c0aa..a0c7da8dbf 100644 --- a/jdaviz/configs/mosviz/tests/test_parsers.py +++ b/jdaviz/configs/mosviz/tests/test_parsers.py @@ -1,4 +1,3 @@ -import warnings from zipfile import ZipFile import pytest @@ -146,11 +145,7 @@ def test_niriss_parser(mosviz_helper, tmp_path): imview = mosviz_helper.app.get_viewer(mosviz_helper._default_image_viewer_reference_name) x_pixcenter = (imview.state.x_max + imview.state.x_min)/2.0 y_pixcenter = (imview.state.y_max + imview.state.y_min)/2.0 - with warnings.catch_warnings(): - # https://github.com/spacetelescope/gwcs/pull/522 - warnings.filterwarnings( - "ignore", message="The bounding_box was set in C order.*") - viewer_center_coord = imview.layers[0].layer.coords.pixel_to_world(x_pixcenter, y_pixcenter) + viewer_center_coord = imview.layers[0].layer.coords.pixel_to_world(x_pixcenter, y_pixcenter) assert_allclose(viewer_center_coord.ra.deg, dc_tab["R.A."][0]) assert_allclose(viewer_center_coord.dec.deg, dc_tab["Dec."][0]) diff --git a/tox.ini b/tox.ini index 07eecb30c0..0ae163193e 100644 --- a/tox.ini +++ b/tox.ini @@ -49,7 +49,7 @@ deps = devdeps: photutils>=0.0.dev0 devdeps: git+https://github.com/astropy/regions.git devdeps: git+https://github.com/astropy/specutils.git - devdeps: git+https://github.com/spacetelescope/gwcs.git + devdeps: git+https://github.com/WilliamJamieson/gwcs.git@ignore_warnings_from_existing_files devdeps: git+https://github.com/asdf-format/asdf.git devdeps: git+https://github.com/astropy/asdf-astropy.git devdeps: git+https://github.com/spacetelescope/stdatamodels.git