-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtox.ini
103 lines (86 loc) · 1.97 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
[tox]
skip_missing_interpreters = true
envlist =
flake8
mypy
yapf
pytest
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]
description =
Common environment.
skip_install = True
allowlist_externals = *
deps =
pytest
commands =
# Install package dependencies
pip install -U --force-reinstall -r {toxinidir}/requirements-latest.txt
# Install the package itself
pip install .
# Run tests
pytest: pytest -sv cfxdb
[testenv:flake8]
description =
Run flake8 style checks.
skip_install = True
deps =
flake8
commands =
# W503: yapfs is right! https://github.com/google/yapf/issues/335
flake8 --ignore=E501,E721,E722,W503,W504,E231,E251,E126 --exclude="cfxdb/gen cfxdb/tests" cfxdb
[testenv:yapf]
description =
Run yapf style checks.
skip_install = True
deps =
yapf==0.29.0
commands =
yapf --version
yapf -rd --style={toxinidir}/yapf.ini --exclude="cfxdb/gen/*" cfxdb
[testenv:mypy]
description =
Run mypy type checks.
skip_install = True
deps =
mypy
commands=
mypy --ignore-missing-imports cfxdb
[testenv:sphinx]
description =
Generate docs using Sphinx.
skip_install = True
deps =
sphinx
sphinx_rtd_theme
sphinxcontrib.images
sphinxcontrib.spelling
extras =
all
commands =
# Install package dependencies
pip install -U --force-reinstall -r {toxinidir}/requirements-latest.txt
# Install the package itself
pip install .
# first test with all warnings fatal
find ./docs -name "*.rst"
sphinx-build -WT -b dummy ./docs ./docs/_build
# generate HTML output
sphinx-build -b html ./docs ./docs/_build