From 8a8c39120bf5c68278ad73572f3df614ae33bc4e Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:40:49 -0500 Subject: [PATCH] Let CI run without scikit-image by skipping test_wfc_findsat_mrt and test_wfc_satdet --- acstools/tests/test_wfc_findsat_mrt.py | 3 +++ acstools/tests/test_wfc_satdet.py | 4 ++++ setup.cfg | 2 ++ 3 files changed, 9 insertions(+) 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/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: