-
Notifications
You must be signed in to change notification settings - Fork 9
/
tox.ini
92 lines (88 loc) · 2.06 KB
/
tox.ini
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
[tox]
min_version = 4.0
requires =
tox-pypi-filter>=0.14
envlist =
py{310,311,312}
build_docs
linkcheck
codestyle
[testenv]
allowlist_externals=
/bin/sh
# Run the tests in a temporary directory to make sure that we don't import anything from the source tree
changedir = .tmp/{envname}
description =
run tests
pass_env =
# A variable to tell tests we are on a CI system
CI
# Custom compiler locations (such as ccache)
CC
# Location of locales (needed by sphinx on some systems)
LOCALE_ARCHIVE
# If the user has set a LC override we should follow it
LC_ALL
# TBD
DISPLAY
# TBD
HOME
setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/liberfa/simple
deps =
extras =
tests
commands_pre =
pip freeze --all --no-input
commands =
pytest \
-vvv \
-r fEs \
--pyargs glue_solar \
--cov-report=xml \
--cov=glue_solar \
--cov-config={toxinidir}/.coveragerc \
{toxinidir}/docs \
{posargs}
[testenv:build_docs]
changedir = docs
description = Invoke sphinx-build to build the HTML docs
extras =
all
docs
commands =
pip freeze --all --no-input
sphinx-build \
-j auto \
--color \
-W \
--keep-going \
-b html \
-d _build/.doctrees \
. \
_build/html \
{posargs}
python -c 'import pathlib; print("Documentation available under file://\{0\}".format(pathlib.Path(r"{toxinidir}") / "docs" / "_build" / "index.html"))'
[testenv:linkcheck]
changedir = docs
description = Invoke sphinx-build to check the URLS within the docs
extras =
all
docs
commands =
pip freeze --all --no-input
sphinx-build \
-qqq \
--color \
-b linkcheck \
. \
_build/html \
{posargs}
[testenv:codestyle]
skip_install = true
description = Run all style and file checks with pre-commit
deps =
pre-commit
commands =
pre-commit install-hooks
pre-commit run --color always --all-files --show-diff-on-failure