Skip to content

Commit

Permalink
Merge pull request #192 from pllim/numpydev-abi-madness
Browse files Browse the repository at this point in the history
TST: Fix devdeps build
  • Loading branch information
pllim authored Dec 8, 2023
2 parents 56521df + 6d1e310 commit af3b9c2
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion acstools/tests/test_wfc_destripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions acstools/tests/test_wfc_findsat_mrt.py
Original file line number Diff line number Diff line change
@@ -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."""
Expand Down
4 changes: 4 additions & 0 deletions acstools/tests/test_wfc_satdet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions acstools/utils_findsat_mrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ACSTOOLS
########

Software tools for
`Advanced Camera for Surveys (ACS) <http://www.stsci.edu/hst/acs/>`_.
`Advanced Camera for Surveys (ACS) <https://www.stsci.edu/hst/acs/>`_.

Different ways to install the latest release of this package::

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit af3b9c2

Please sign in to comment.