-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
172 lines (161 loc) · 3.82 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[tox]
envlist = flake,mypy,pylint,bandit,py313-django51-coverage,py310-django51-install,builddoc
skipsdist = True
allowlist_externals =
rm
bash
yarn
[gh-actions]
python =
3.10: flake,mypy,pylint,bandit,py310-django51-install
3.11: builddoc
3.13: py313-django51-coverage
[testenv]
passenv = *
changedir = test_src/
setenv =
install: PYTHONPATH = ./:$PYTHONPATH
coverage: PYTHONPATH = ../.:$PYTHONPATH
coverage: SETUPTOOLS_ENABLE_FEATURES = legacy-editable
COVRC = ../pyproject.toml
EXECUTE_ARGS = test_proj test -v 2 --failfast --parallel auto
PYTHON_JIT = 1
CCACHE_DIR = {envdir}/.ccache
TEST_PROJ_LOG_LEVEL = DEBUG
TEST_PROJ_DB_TYPE = mysql
TEST_PROJ_DB_HOST = mysql
TEST_PROJ_DB_NAME = mysql
TEST_PROJ_DB_USER = mysql
TEST_PROJ_DB_PASSWORD = mysql
TEST_PROJ_MAIL_HOST = localhost
TEST_PROJ_MAIL_PORT = 26
TEST_PROJ_UWSGI_LISTEN = 121
UWSGI_PROFILE = minimal
django51: DJANGO_DEP =
PYLINTHOME={envdir}/.pylint.d/
install: BUILD_OPTIMIZATION = true
install: BUILD_COMPILE = true
allowlist_externals =
rm
ls
bash
head
pwd
yarn
commands =
pip uninstall vstutils -y
pip cache dir
install: rm -rfv {envdir}/dist/
install: pip wheel {toxinidir} -w {envdir}/dist/ --no-deps
install: bash -ec "pip install -U $(ls {envdir}/dist/*.whl | head -1)[all]"
pwd
install: python -m {env:EXECUTE_ARGS} {posargs}
coverage: pip install -v -U -e ..[all]
coverage: python -m test_proj makemigrations vstutils vstutils_api vstutils_webpush --check
coverage: coverage erase --rcfile={env:COVRC}
coverage: coverage run --rcfile={env:COVRC} {env:EXECUTE_ARGS} --durations 20 {posargs}
coverage: coverage combine --rcfile={env:COVRC}
coverage: coverage report --rcfile={env:COVRC}
pip uninstall vstutils -y
rm -rf ../.eggs ../build {envdir}/dist
deps =
pip~=23.3.1
wheel
build
setuptools
[testenv:flake]
changedir = ./
deps =
flake8==6.1.0
flake8-bugbear==24.2.6
flake8-commas==2.1.0
flake8-comprehensions==3.14.0
flake8-django==1.4.0
flake8-executable==2.1.3
flake8-functions==0.0.8
flake8-import-order==0.18.2
Flake8-pyproject==1.2.3
commands =
flake8 vstutils
[testenv:bandit]
changedir = ./
deps =
bandit[toml]==1.7.8
commands =
bandit -r vstutils -c pyproject.toml
[testenv:mypy]
basepython = python3.10
changedir = ./
setenv =
DONT_YARN = true
deps =
mypy==1.10.1
commands =
pip uninstall vstutils -y
pip install -U -e .[stubs]
mypy -p vstutils
[testenv:pylint]
basepython = python3.10
changedir = ./
setenv =
DONT_YARN = true
deps =
pylint==3.3.0
pylint-django==2.5.5
pylint-plugin-utils==0.8.2
-rrequirements-git.txt
commands =
pip uninstall vstutils -y
pip install -U -e .[all]
pylint --rcfile=./.pylintrc --django-settings-module=vstutils.settings {posargs} vstutils
[testenv:js_style]
changedir = ./
deps =
allowlist_externals = yarn
commands =
yarn install
yarn lint
[testenv:js_tests]
changedir = ./
deps =
allowlist_externals = yarn
commands =
yarn install
yarn test
[testenv:builddoc]
basepython = python3.11
changedir = ./doc/
allowlist_externals =
make
setenv =
READTHEDOCS = true
LC_ALL = C
commands =
make trans_update
make -e SPHINXOPTS="-D language='ru'" html
# make -e SPHINXOPTS="-D language='ru'" latexpdf
deps =
-rrequirements-rtd.txt
[testenv:build]
basepython = python3.10
passenv = *
changedir = .
allowlist_externals =
tox
rm
commands =
rm -rf dist build
tox -c tox_build.ini --workdir {envdir}
deps =
[testenv:contrib]
basepython = python3.10
skipsdist = False
usedevelop = True
envdir = {toxinidir}/env
setenv = CCACHE_DIR = {envdir}/.ccache
passenv = *
allowlist_externals = *
commands =
pip install -U -e ..[all]
deps =
tox>=4