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

TST: Fix devdeps build #192

Merged
merged 5 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
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: 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
Loading