Skip to content

Commit 6ecb43f

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 2c08ba1 commit 6ecb43f

37 files changed

Lines changed: 23 additions & 24 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 & 7 deletions
This file was deleted.

‎pyproject.toml‎

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

7882
[tool.cibuildwheel.linux]
@@ -84,7 +88,3 @@ before-all = "brew install autoconf automake libtool libomp"
8488

8589
[tool.setuptools_scm]
8690
write_to = "healpy/version.py"
87-
88-
[tool.pytest.ini_options]
89-
addopts = "--doctest-plus --doctest-cython -v"
90-
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)