-
Notifications
You must be signed in to change notification settings - Fork 48
/
tox.ini
86 lines (78 loc) · 2.03 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
[tox]
minversion = 3.2.0
envlist=py,linter,docs
[testenv]
extras =
test
commands=
python -m pytest \
--cov=sphinxcontrib.spelling \
--cov-report term-missing \
--log-level DEBUG
passenv=
# Let the caller point to where libenchant is on their system, in
# case it's in an unusual place. For example, on macOS with
# Homebrew installing python 3.9 by default but tox being run from
# the python.org distribution of 3.10, set
# PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib in
# the shell environment before running tox.
PYENCHANT_LIBRARY_PATH
[testenv:isolated]
isolated_build=true
changedir={envtmpdir}
allowlist_externals =
/bin/cp
/bin/rm
commands=
/bin/rm -rf tests
/bin/cp -a {toxinidir}/tests .
python -m pytest \
--cov=sphinxcontrib.spelling \
--cov-report term-missing \
--log-level DEBUG
[testenv:style]
deps =
isort>=5.0.1
commands =
isort .
skip_install = true
[testenv:linter]
deps=
flake8==4.0.1
flake8-debug==0.1.0
isort>=5.0.1
setenv =
BUILD=linter
commands =
flake8 sphinxcontrib integration_tests
isort --check --diff .
skip_install = true
[testenv:pkglint]
deps=
build
twine
check-python-versions
commands=
python -m build
twine check dist/*.tar.gz dist/*.whl
check-python-versions --only pyproject.toml,.github/workflows/test.yml
[flake8]
show-source = True
exclude = .tox,dist,doc,*.egg,build
ignore = W504
per-file-ignores =
integration_tests/build_django.py: DB100
[testenv:docs]
setenv =
BUILD=docs
ENABLE_SPELLING=1
commands =
sphinx-build -W -j auto -b html -d docs/build/doctrees docs/source docs/build/html
sphinx-build -W -j auto -b linkcheck -d docs/build/doctrees docs/source docs/build/linkcheck
sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling
[testenv:spelling]
setenv =
BUILD=docs
ENABLE_SPELLING=1
commands =
sphinx-build -W -j auto -b spelling -d docs/build/doctrees docs/source docs/build/spelling