-
Notifications
You must be signed in to change notification settings - Fork 46
/
tox.ini
119 lines (91 loc) · 2.18 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
114
115
116
117
118
119
[tox]
envlist=py38,quality,coverage,test,build,deploy,docs
skipsdist=True
[testenv:quality]
allowlist_externals = poetry
mypy
ruff
changedir = .
deps =
-rrequirements.txt
commands =
poetry lock --no-update
poetry install -v --sync
ruff check ./TEx
mypy --config-file mypy.ini
[testenv:coverage]
allowlist_externals = poetry
changedir = tests
deps =
-rrequirements.txt
commands =
poetry lock --no-update
poetry install -v --sync
poetry run coverage erase
poetry run coverage run --source='../TEx' -m pytest . {posargs} --color=yes
poetry run coverage report --rcfile=../coverage.rc
poetry run coverage html --rcfile=../coverage.rc --fail-under=85
[testenv]
allowlist_externals = poetry
changedir = tests
deps =
-rrequirements.txt
commands =
poetry lock --no-update
poetry install -v --sync
poetry run pytest . {posargs} --verbose --color=yes
[testenv:build]
allowlist_externals = cp
rm
skip_install = True
changedir = .
deps =
-rrequirements.txt
commands =
cp README.md TEx
cp pyproject.toml TEx
poetry lock --no-update
poetry install --without dev -v --sync
poetry build -v
rm TEx/README.md
rm TEx/pyproject.toml
[testenv:deploy]
allowlist_externals = cp
rm
skip_install = True
changedir = .
deps =
poetry==1.5.1
passenv =
PYPI_DEPLOY_TOKEN
commands =
cp README.md TEx
cp pyproject.toml TEx
poetry lock --no-update
poetry install --without dev -v --sync
poetry config pypi-token.pypi {env:PYPI_DEPLOY_TOKEN}
poetry publish --build
rm TEx/README.md
rm TEx/pyproject.toml
[testenv:docs]
allowlist_externals = mkdocs
skip_install = True
changedir = .
deps =
poetry==1.5.1
commands =
poetry lock --no-update
poetry install -v --sync
mkdocs build --clean --site-dir compiled_docs -v
[flake8]
ignore=E501,D202,D401,D902,I100,I201,I202
exclude=coverage,codequality,.git,__pycache__,build,dist,venv,.tox,data,assets,htmlcov,.idea,tests
max-complexity=15
verbose=2
count=True
hang_closing=True
hang-closing=True
show_source=True
show-source=True
statistics=True
jobs=6