generated from PietroPasotti/charm-lib-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
130 lines (115 loc) · 3.12 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
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = lint-capture, static-capture, unit-capture, lint-networking, static-networking, unit-networking, lint-harness-ctx, static-harness-ctx, unit-harness-ctx
[vars]
all_path = {[vars]tst_path}
capture_events_root = {toxinidir}/libs/capture_events
capture_events_source = {[vars]capture_events_root}/capture_events.py
networking_root = {toxinidir}/libs/networking
networking_source = {[vars]networking_root}/networking.py
harness_ctx_root = {toxinidir}/libs/harness_ctx
harness_ctx_source = {[vars]harness_ctx_root}/harness_ctx.py
[testenv]
basepython = python3
setenv =
PYTHONPATH={toxinidir}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
passenv =
PYTHONPATH
HOME
PATH
MODEL_SETTINGS
[testenv:lint-capture]
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 {[vars]capture_events_source} --ignore=D105,D107,E501,D100,E704,N802
isort --check-only --diff --profile=black {[vars]capture_events_source}
black --check --diff {[vars]capture_events_source}
[testenv:static-capture]
description = Static analysis
deps =
pyright
ops
commands =
pyright {[vars]capture_events_source}
[testenv:unit-capture]
description = Run unit tests
deps =
-r{toxinidir}/requirements.txt
pytest
commands =
pytest {[vars]capture_events_root}/tests/
[testenv:lint-networking]
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 {[vars]networking_source} --ignore=D105,D107,E501,D100,E704,N802
isort --check-only --diff --profile=black {[vars]networking_source}
black --check --diff {[vars]networking_source}
[testenv:static-networking]
description = Static analysis
deps =
pyright
ops
commands =
pyright {[vars]networking_source}
[testenv:unit-networking]
description = Run unit tests
deps =
-r{toxinidir}/requirements.txt
pytest
commands =
pytest {[vars]networking_root}/tests/
[testenv:lint-harness-ctx]
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 {[vars]harness_ctx_source} --ignore=D105,D107,E501,D100,E704,N802
isort --check-only --diff --profile=black {[vars]harness_ctx_source}
black --check --diff {[vars]harness_ctx_source}
[testenv:static-harness-ctx]
description = Static analysis
deps =
pyright
ops
commands =
pyright {[vars]harness_ctx_source}
[testenv:unit-harness-ctx]
description = Run unit tests
deps =
-r{toxinidir}/requirements.txt
pytest
commands =
pytest {[vars]harness_ctx_root}/tests/