Skip to content

Commit 10a4647

Browse files
committed
skip without gwcs
1 parent ced5227 commit 10a4647

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

asdf_astropy/converters/wcs/tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
@pytest.fixture
77
def gwcs_4d_identity_units():
8+
pytest.importorskip("gwcs")
89
from gwcs.examples import gwcs_4d_identity_units
910

1011
return gwcs_4d_identity_units()

asdf_astropy/converters/wcs/tests/test_highlevelwcswrapper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asdf
2-
import gwcs
32
import pytest
43
from astropy.wcs import WCS
54
from astropy.wcs.wcsapi import HighLevelWCSWrapper
@@ -8,6 +7,11 @@
87

98
from asdf_astropy.testing.helpers import assert_gwcs_equal, assert_wcs_equal
109

10+
try:
11+
import gwcs
12+
except ImportError:
13+
gwcs = None
14+
1115

1216
@pytest.fixture
1317
def wrapped_wcses(all_4d_wcses):
@@ -40,7 +44,7 @@ def test_hllwcs_serialization(hl_wcs, tmp_path):
4044

4145
if isinstance(loaded_ll_wcs, WCS):
4246
assert_wcs_equal(ll_wcs, loaded_ll_wcs)
43-
elif isinstance(loaded_ll_wcs, gwcs.WCS):
47+
elif gwcs and isinstance(loaded_ll_wcs, gwcs.WCS):
4448
assert_gwcs_equal(loaded_ll_wcs, ll_wcs)
4549
else:
4650
msg = f"Loaded an unexpected type: {type(loaded_ll_wcs)}"

pyproject.toml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
"asdf-coordinates-schemas>=0.4",
1919
"asdf-transform-schemas>=0.6",
2020
"asdf-standard>=1.1.0",
21-
"astropy>=6.0",
21+
"astropy>=5.3",
2222
"numpy>=1.26",
2323
"packaging>=19",
2424
]
@@ -33,18 +33,14 @@ docs = [
3333
"sphinx-automodapi",
3434
"tomli",
3535
]
36-
# test deps which oldestdeps installs oldest versions
37-
test-oldest = [
38-
"scipy>=1.14.1", # indirect requirement via astropy, oldest version supported by gwcs
39-
"gwcs>=0.22",
40-
]
4136
test = [
42-
"asdf-astropy[test-oldest]",
4337
"coverage",
4438
"pytest-astropy",
4539
"pytest-asdf-plugin",
4640
"pytest-lazy-fixtures",
4741
"pytest",
42+
"scipy>=1.14.1", # indirect requirement via astropy, oldest version supported by gwcs
43+
"gwcs>=0.22",
4844
]
4945
[project.urls]
5046
'documentation' = 'https://asdf-astropy.readthedocs.io/en/latest/'

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ commands_pre=
3838
devdeps: pip install -U --pre -i https://pypi.anaconda.org/astropy/simple astropy
3939

4040
# Generate `requiremments-min.txt`
41-
oldestdeps: minimum_dependencies asdf-astropy --extras test-oldest --filename {envtmpdir}/requirements-min.txt
41+
oldestdeps: minimum_dependencies asdf-astropy --filename {envtmpdir}/requirements-min.txt
4242
# Force install everything from `requirements-min.txt`
4343
oldestdeps: pip install -r {envtmpdir}/requirements-min.txt
44+
oldestdeps: pip uninstall -y gwcs
4445

4546
pip freeze
4647
commands =

0 commit comments

Comments
 (0)