Skip to content

Commit f8adc75

Browse files
committed
Exclude tests from installation
This reduces the size of the installation by a few MB, making Healpy a little bit more cloud-friendly. See astropy/astropy#16152.
1 parent 8d17561 commit f8adc75

37 files changed

Lines changed: 23 additions & 29 deletions

‎MANIFEST.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
recursive-include healpy/data *.fits
22
recursive-include healpy/data *_cmap.dat
3-
recursive-include healpy/test/data *
4-
exclude healpy/test/data/ipython*
3+
recursive-include test *
4+
exclude test/data/ipython*
55
exclude cextern/cfitsio/*pdf cextern/cfitsio/*ps cextern/cfitsio/*doc cextern/cfitsio/*tex
66
prune cextern/cfitsio/docs
77
exclude *.so

conftest.py renamed to healpy/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
import numpy as np
2+
3+
14
def pytest_configure(config):
5+
np.set_printoptions(legacy="1.13")
6+
27
config.option.astropy_header = True
38
try:
49
from pytest_astropy_header.display import PYTEST_HEADER_MODULES

‎healpy/test/conftest.py‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎pyproject.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies = ["numpy>=1.19", "astropy"]
2828
all = ["matplotlib", "scipy"]
2929
test = [
3030
"pytest",
31+
"pytest-astropy-header",
3132
"pytest-cython",
3233
"pytest-doctestplus",
3334
"requests",
@@ -71,7 +72,10 @@ healpy = ["data/*.fits",
7172
# Skip i686 builds.
7273
# Skip MUSL libc builds.
7374
skip = "pp* *_i686 *-musllinux_*"
74-
test-command = "pytest --doctest-plus --doctest-cython -v --pyargs healpy"
75+
test-command = [
76+
"pytest --doctest-plus --doctest-cython --pyargs healpy",
77+
"pytest {project}/test"
78+
]
7579
test-extras = ["test"]
7680

7781
[tool.cibuildwheel.linux]
@@ -83,7 +87,3 @@ before-all = "brew install autoconf automake libtool libomp"
8387

8488
[tool.setuptools_scm]
8589
write_to = "healpy/version.py"
86-
87-
[tool.pytest.ini_options]
88-
addopts = "--doctest-plus --doctest-cython -v"
89-
testpaths = "healpy"

‎test/conftest.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../healpy/conftest.py
File renamed without changes.

healpy/test/data/anafast_3_11_config_test_anafast_nomask.par renamed to test/data/anafast_3_11_config_test_anafast_nomask.par

File renamed without changes.

healpy/test/data/anafast_3_11_config_test_anafast_xspectra.par renamed to test/data/anafast_3_11_config_test_anafast_xspectra.par

File renamed without changes.

healpy/test/data/cl_wmap_band_iqumap_r9_7yr_WVxspec_v4_udgraded32_II_lmax64_rmmono_3iter.fits renamed to test/data/cl_wmap_band_iqumap_r9_7yr_WVxspec_v4_udgraded32_II_lmax64_rmmono_3iter.fits

File renamed without changes.

0 commit comments

Comments
 (0)