-
Notifications
You must be signed in to change notification settings - Fork 13
/
tox.ini
85 lines (72 loc) · 1.94 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
[tox]
envlist = py311, static, docs
[testenv]
basepython = python3.11
deps=
-r requirements.txt
-r test-requirements.txt
commands=pytest {posargs}
allowlist_externals=sh
[testenv:pip-compile]
deps = pip-tools
skip_install = true
skipsdist = true
commands =
pip-compile -U --resolver=backtracking --generate-hashes requirements.in -o requirements.txt
pip-compile -U --resolver=backtracking --generate-hashes requirements.in test-requirements.in -o test-requirements.txt
[testenv:static]
commands=
mypy --install-types --non-interactive -p exodus_gw -p tests
sh -c 'pylint exodus_gw; test $(( $? & (1|2|4|32) )) = 0'
isort --check .
[testenv:cov]
usedevelop=true
commands=
pytest --cov-report=html --cov=exodus_gw {posargs}
[testenv:cov-ci]
passenv=GITHUB_*
usedevelop=true
commands=
pytest --cov=exodus_gw {posargs}
coveralls --service=github
[testenv:bandit]
usedevelop=true
commands=
bandit -r -ll -c bandit.yaml .
[testenv:safety]
usedevelop=true
commands=
safety check --output json {posargs}
[testenv:docs]
use_develop=true
commands=
sphinx-build -M html docs docs/_build
python scripts/gen-openapi
[testenv:alembic-autogen]
use_develop=true
passenv=EXODUS_GW*
commands=
python scripts/alembic-autogen {posargs}
[testenv:dev-worker]
use_develop=true
passenv=EXODUS_GW*
commands=
dramatiq --watch exodus_gw --watch-use-polling exodus_gw.worker -p 1 {posargs}
[testenv:dev-server]
use_develop=true
passenv=EXODUS_GW*
commands=
uvicorn --reload --reload-dir exodus_gw exodus_gw.main:app {posargs}
[pytest]
testpaths = tests
addopts =
-v
# Turn 'coroutine ... was never awaited' warnings into errors...
-Werror:coroutine:RuntimeWarning
# ..and we also have to turn these into errors, because those coroutine
# warnings happen outside of test functions and pytest will otherwise
# not allow them to be raised
-Werror::pytest.PytestUnraisableExceptionWarning
asyncio_mode = auto
[coverage:run]
relative_files = true