-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
57 lines (52 loc) · 1.15 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
# Copyright 2021 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
skipsdist=True
skip_missing_interpreters = True
envlist = lint, static, unit
[vars]
tst_path = {toxinidir}/test/
all_path = {[vars]tst_path}
# TEMPLATE: Filled in by ./scripts/init.sh
lib_source = {toxinidir}/$LIB_NAME.py
[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 {[vars]lib_source} --ignore=D105,D107,E501,D100,E704,N802
isort --check-only --diff --profile=black {[vars]lib_source}
black --check --diff {[vars]lib_source}
[testenv:static]
description = Static analysis
deps =
pyright
ops
commands =
pyright {[vars]lib_source}
[testenv:unit]
description = Run unit tests
deps =
-r{toxinidir}/requirements.txt
pytest
commands =
pytest {toxinidir}/test/