-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
71 lines (65 loc) · 1.4 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
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = pydantic, no_pydantic, lint, static
[vars]
tst_path = {toxinidir}/test/
all_path = {[vars]tst_path}
[testenv]
basepython = python3
setenv =
PYTHONPATH={toxinidir}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
passenv =
PYTHONPATH
HOME
PATH
MODEL_SETTINGS
[testenv:lint]
description = Check code against coding style standards
deps =
autopep8
isort
flake8
flake8-docstrings
flake8-builtins
pyproject-flake8
pep8-naming
black
commands =
# pflake8 wrapper suppports config from pyproject.toml
pflake8 {toxinidir}/endpoint_wrapper.py --ignore=D105,D107,E501,D100,E704,N802
isort --check-only --diff --profile=black {toxinidir}/endpoint_wrapper.py
black --check --diff {toxinidir}/endpoint_wrapper.py
[testenv:static]
description = Static analysis
deps =
pyright
ops
pydantic
commands =
pyright {toxinidir}/endpoint_wrapper.py
[testenv:pydantic]
description = Run unit tests with pydantic
deps =
-r{toxinidir}/requirements.txt
pytest
pydantic
ipdb
pyyaml
pyright
commands =
pytest {toxinidir}/test/
[testenv:no_pydantic]
description = Run unit tests without pydantic
deps =
-r{toxinidir}/requirements.txt
pytest
ipdb
pyyaml
pyright
commands =
pytest {toxinidir}/test/