-
-
Notifications
You must be signed in to change notification settings - Fork 435
Expand file tree
/
Copy pathtox.ini
More file actions
101 lines (83 loc) · 3.45 KB
/
tox.ini
File metadata and controls
101 lines (83 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[tox]
envlist =
py{310,311,312,313,314}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-online}{,-cov}
codestyle
linkcheck
build_docs
requires =
setuptools >= 30.3.0
pip >= 19.3.1
isolated_build = true
[testenv]
# Pass through the following environment variables which are needed for the CI
passenv = HOME,WINDIR,CI
# Run the tests in a temporary directory to make sure that we don't import
# astropy from the source tree
changedir = .tmp/{envname}
description = run tests
setenv =
PYTEST_ARGS = ''
# We have two pytest runs for the online tests, need to suppress the failing status for the first one to be able to run the second.
online: PYTEST_ARGS = --remote-data=any -m "not bigdata" --suppress-tests-failed-exit-code --cache-clear
online: PYTEST_ARGS_2 = --remote-data=any -m "not bigdata" -vv --last-failed --last-failed-no-failures none --suppress-no-test-exit-code
online: SINGLE_RUN = False
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple
deps =
devdeps: numpy>=0.0.dev0
devdeps: matplotlib>=0.0.dev0
devdeps: astropy>=0.0.dev0
devdeps: pyerfa>=0.0.dev0
devdeps: git+https://github.com/astropy/pyvo.git#egg=pyvo
# mpl while not a dependency, it's required for the tests, and would pull up a newer numpy version if not pinned.
# And pillow should be pinned as well, otherwise a too new version is pulled that is not compatible with old np.
oldestdeps: astropy==5.0.0
oldestdeps: numpy==1.22
oldestdeps: matplotlib==3.5.0
oldestdeps: pillow==10.0.0
oldestdeps: pyvo==1.5
oldestdeps: pytest-doctestplus==1.4
oldestdeps: requests==2.26
oldestdeps: keyring==23.0
oldestdeps: pytest==7.4
oldestdeps: beautifulsoup4==4.10
oldestdeps-alldeps: mocpy==0.12
oldestdeps-alldeps: regions==0.5
oldestdeps-alldeps: astropy-healpix==0.7
online: pytest-custom_exit_code
extras =
test
alldeps: all
commands =
# Force numpy reinstall to work around upper version limits in downstream dependencies
devdeps: pip install -U --pre --no-deps --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
python -m pip freeze
!cov: pytest --pyargs astroquery {toxinidir}/docs {env:PYTEST_ARGS} {posargs}
cov: pytest --pyargs astroquery {toxinidir}/docs --cov astroquery --cov-config={toxinidir}/pyproject.toml {env:PYTEST_ARGS} {posargs}
# For remote tests, we re-run the failures to filter out at least some of the flaky ones.
# We use a second pytest run with --last-failed as opposed to --rerun in order to rerun the
# failed ones at the end rather than right away.
online: pytest --pyargs astroquery {toxinidir}/docs {env:PYTEST_ARGS_2} {posargs}
cov: coverage xml -o {toxinidir}/coverage.xml
pip_pre =
predeps: true
!predeps: false
[testenv:codestyle]
changedir = {toxinidir}
skip_install = true
description = check code style
deps = flake8-pyproject
commands = flake8 astroquery --count
[testenv:build_docs]
changedir = {toxinidir}/docs
description = Building the narrative and API docs
extras = docs, all
commands =
python -m pip freeze
sphinx-build -W . _build/html
[testenv:linkcheck]
changedir = {toxinidir}/docs
description = check the links in the HTML docs
extras = docs, all
commands =
python -m pip freeze
sphinx-build -W --keep-going -b linkcheck . _build/html