-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
113 lines (97 loc) · 2.2 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[tox]
skip_missing_interpreters = true
envlist =
py37
py38
py39
py310
py311
pypy37
pypy38
pypy39
flake8
mypy
yapf
sphinx
# MAP: GitHub Actions Python Name => Tox Env Name (for Python)
#
# when called without a specific environment ("-e"), detect the
# python version / get from GH action, and map to tox env
#
# https://github.com/ymyzk/tox-gh-actions
#
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3.7: pypy37
pypy-3.8: pypy38
pypy-3.9: pypy39
[testenv]
allowlist_externals = *
setenv =
PYTHONPATH = {toxinidir}
# LMDB_FORCE_CFFI = "1"
# SODIUM_INSTALL = "bundled"
deps =
-r{toxinidir}/requirements-dev.txt
commands =
{py37,py38,py39,py310,py311,pypy37,pypy38,pypy39}: pytest -v -s --basetemp={envtmpdir} zlmdb
[testenv:flake8]
skip_install = True
deps =
flake8
commands =
python -V
flake8 --max-line-length=119 --exclude=zlmdb/tests/user_typed.py --exclude=zlmdb/flatbuffers,zlmdb/tests/MNodeLog.py zlmdb
[testenv:yapf]
description =
Run yapf style checks.
skip_install = True
deps =
# https://github.com/google/yapf/issues/712
yapf==0.29.0
commands =
python -V
yapf --version
yapf -rd --style=yapf.ini --exclude="zlmdb/flatbuffers/*" --exclude="zlmdb/tests/MNodeLog.py" zlmdb
[testenv:mypy]
description =
Run mypy type checks.
skip_install = True
deps =
mypy
commands=
python -V
mypy --version
mypy --install-types --non-interactive --ignore-missing-imports --config-file {toxinidir}/mypy.ini zlmdb
[testenv:pylint]
description =
Run pylint checks.
skip_install = False
deps =
pylint
commands=
python -V
pylint --version
pylint --errors-only --ignore-patterns="zlmdb/flatbuffers/*","zlmdb/test/*" zlmdb
[testenv:sphinx]
description =
Generate docs using Sphinx.
skip_install = False
deps =
sphinx>=1.7.1
sphinxcontrib-images
sphinxcontrib-spelling
sphinx-autoapi
sphinx_rtd_theme
commands =
python -V
sphinx-build --version
# first test with all warnings fatal
sphinx-build -nWT -b dummy ./docs ./docs/_build
# generate HTML output
sphinx-build -b html ./docs ./docs/_build