-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
64 lines (56 loc) · 1.54 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
[tox]
minversion = 3.8
envlist = py38, py39, py310, lint, coverage, django, lint, black, ecosystem, docs, jupyter
skipsdist = True
[testenv]
usedevelop = true
install_command = pip install -U {opts} {packages}
passenv = *
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps = -r {env:FOLDER:client}/requirements.txt
-r requirements-dev.txt
commands =
pip check {env:FOLDER:}
python -m unittest discover -s {env:FOLDER:client} -v
[testenv:coverage]
basepython = python3
commands =
coverage3 run -m unittest discover -s {env:FOLDER:client} -v
coverage3 report --fail-under=80
[testenv:django]
basepython = python3
commands =
pip check {env:FOLDER:}
coverage3 run {env:FOLDER:api_server}/manage.py test {env:FOLDER:api_server}/
coverage3 report --fail-under=80
[testenv:lint]
envdir = .tox/lint
commands =
pylint -rn {env:FOLDER:client}
[testenv:black]
envdir = .tox/lint
deps = -r requirements-dev.txt
commands = black {posargs} {env:FOLDER:client} --check
[testenv:ecosystem]
skip_install = true
allowlist_externals = /bin/bash
deps =
commands =
/bin/bash -ec 'cat ecosystem.json | jq empty'
[testenv:docs]
skip_install = false
setenv =
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
deps =
-r ./docs/requirements-doc.txt
commands =
sphinx-build -b html -W {posargs} docs/ docs/_build/html
[testenv:jupyter]
allowlist_externals = /bin/bash
commands =
pip install client/.
jupyter nbconvert --to notebook --execute docs/guides/*.ipynb
/bin/bash -ec 'rm -rf docs/guides/*.nbconvert.ipynb docs/guides/trials'