diff --git a/acstools/tests/test_wfc_destripe.py b/acstools/tests/test_wfc_destripe.py index 67e08e38..533fb73b 100644 --- a/acstools/tests/test_wfc_destripe.py +++ b/acstools/tests/test_wfc_destripe.py @@ -26,7 +26,9 @@ def _destripe_one(self, inputfile, outsuffix, outputfile, truthfile, mask1=masks[0], mask2=masks[1]) # Compare results - self.compare_outputs([(outputfile, truthfile)], rtol=1e-6) + # NOTE: atol instead of rtol was set due to numpy 2.0, + # see https://github.com/spacetelescope/acstools/issues/184 + self.compare_outputs([(outputfile, truthfile)], atol=0.01) # jb5g05ubq = calibrated post-SM4 WFC full-frame exposures without masks # ja0x03ojq = calibrated polarizer WFC subarray exposures diff --git a/acstools/tests/test_wfc_findsat_mrt.py b/acstools/tests/test_wfc_findsat_mrt.py index e7045f7e..743908b3 100644 --- a/acstools/tests/test_wfc_findsat_mrt.py +++ b/acstools/tests/test_wfc_findsat_mrt.py @@ -1,11 +1,14 @@ '''Test satellite trail detection and masking using findsat_mrt.''' import os +import pytest from astropy.io.fits import FITSDiff from astropy.utils.data import get_pkg_data_filename from acstools.findsat_mrt import WfcWrapper +pytest.importorskip("skimage") + def test_WfcWrapper(tmp_path): """Identify and mask trails in WFC extension 4.""" diff --git a/acstools/tests/test_wfc_satdet.py b/acstools/tests/test_wfc_satdet.py index 90d72649..1434095f 100644 --- a/acstools/tests/test_wfc_satdet.py +++ b/acstools/tests/test_wfc_satdet.py @@ -3,10 +3,14 @@ .. note:: Cannot test ``detsat()`` because PHT results change from run to run! """ +import pytest + from acstools import satdet from acstools.utils_findsat_mrt import update_dq from acstools.tests.helpers import BaseACSTOOLS +pytest.importorskip("skimage") + class TestSatDet(BaseACSTOOLS): detector = 'wfc' diff --git a/acstools/utils_findsat_mrt.py b/acstools/utils_findsat_mrt.py index cdaa87a7..51637cd1 100644 --- a/acstools/utils_findsat_mrt.py +++ b/acstools/utils_findsat_mrt.py @@ -20,8 +20,8 @@ from skimage import transform from skimage.transform._warps import warp from skimage._shared.utils import convert_to_float -except ImportError: - warnings.warn('skimage not installed. MRT calculation will not work.') +except ImportError as e: + warnings.warn(f'skimage not installed. MRT calculation will not work: {repr(e)}') # check for scipy try: diff --git a/doc/source/index.rst b/doc/source/index.rst index 49448f25..d6a14d43 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -5,7 +5,7 @@ ACSTOOLS ######## Software tools for -`Advanced Camera for Surveys (ACS) `_. +`Advanced Camera for Surveys (ACS) `_. Different ways to install the latest release of this package:: diff --git a/setup.cfg b/setup.cfg index 555a3651..5cb16741 100644 --- a/setup.cfg +++ b/setup.cfg @@ -87,6 +87,8 @@ filterwarnings = # Ignore numpy 2.0 warning, see https://github.com/astropy/astropy/pull/15495 # and https://github.com/scipy/scipy/pull/19275 ignore:.*numpy\.core.*:DeprecationWarning + # Do not let broken scikit-image block the rest of test suite + ignore:skimage not installed [flake8] # Ignoring these for now: diff --git a/tox.ini b/tox.ini index b859d32f..a3e4ddeb 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ envlist = passenv = HOME,CI,jref setenv = - devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple # Run the tests in a temporary directory to make sure that we don't import # package from the source tree @@ -38,6 +38,7 @@ deps = devdeps: scipy>=0.0.dev0 devdeps: matplotlib>=0.0.dev0 devdeps: scikit-image>=0.0.dev0 + devdeps: pyerfa>=0.0.dev0 devdeps: astropy>=0.0.dev0 devdeps: git+https://github.com/astropy/photutils.git devdeps: git+https://github.com/spacetelescope/ci_watson.git