Debian Codegraph @

tox.ini

raw
1 [tox]
2 envlist =
3 py{310,311,312,313}-test{,-alldeps,-devdeps,-predeps}{,-cov}
4 build_docs
5 linkcheck
6 codestyle
7 requires =
8 setuptools >= 30.3.0
9 pip >= 19.3.1
10 isolated_build = true
11
12 [testenv]
13 setenv =
14 # Enable assertions
15 CFLAGS=-UNDEBUG
16
17 # Suppress display of matplotlib plots generated during docs build
18 MPLBACKEND=agg
19
20 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
21
22 # Pass through the following environment variables which may be needed for the CI
23 passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI
24
25 # Run the tests in a temporary directory to make sure that we don't import
26 # this package from the source tree
27 changedir = .tmp/{envname}
28
29 # tox environments are constructed with so-called 'factors' (or terms)
30 # separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
31 # will only take effect if that factor is included in the environment name. To
32 # see a list of example environments that can be run, along with a description,
33 # run:
34 #
35 # tox -l -v
36 #
37 description =
38 run tests
39 alldeps: with all optional dependencies
40 devdeps: with the latest developer version of key dependencies
41 oldestdeps: with the oldest supported version of key dependencies
42 cov: and test coverage
43
44 # The following provides some specific pinnings for key packages
45 deps =
46
47 cov: coverage
48 cov: pytest-cov
49
50 oldestdeps: numpy==1.25.*
51 oldestdeps: astropy==5.0.*
52
53 devdeps: numpy>=0.0.dev0
54 devdeps: pyerfa>=0.0.dev0
55 devdeps: astropy>=0.0.dev0
56 devdeps: healpy
57
58 alldeps: healpy
59
60 # The following indicates which extras_require from setup.cfg will be installed
61 extras =
62 test
63 alldeps: all
64
65 install_command =
66 !devdeps: python -I -m pip install
67 devdeps: python -I -m pip install -v --pre
68
69 commands =
70 pip freeze
71 !cov: pytest --pyargs astropy_healpix {toxinidir}/docs {posargs}
72 cov: pytest --pyargs astropy_healpix {toxinidir}/docs --cov astropy_healpix --cov-config={toxinidir}/setup.cfg {posargs}
73 cov: coverage xml -o {toxinidir}/coverage.xml
74
75 pip_pre =
76 predeps: true
77 !predeps: false
78
79 [testenv:build_docs]
80 changedir = docs
81 description = invoke sphinx-build to build the HTML docs
82 extras = docs
83 commands =
84 pip freeze
85 sphinx-build -W -b html . _build/html
86
87 [testenv:linkcheck]
88 changedir = docs
89 description = check the links in the HTML docs
90 extras = docs
91 commands =
92 pip freeze
93 sphinx-build -W -b linkcheck . _build/html
94
95 [testenv:codestyle]
96 skip_install = true
97 changedir = .
98 description = check code style, e.g. with flake8
99 deps = flake8
100 commands = flake8 astropy_healpix --count --max-line-length=100