-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
76 lines (70 loc) · 1.49 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
[tox]
minversion = 3.8.0
envlist = python3.8, python3.9, flake8, mypy, docs
isolated_build = true
[gh-actions]
python =
3.8: python3.8, flake8, mypy, docs
3.9: python3.9
[testenv]
description = Run tests.
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements.txt
.[dev]
commands =
pytest --basetemp={envtmpdir} --cov
[testenv:mypy]
description = Run mypy typing analysis.
skip_install = true
deps =
mypy
types-PyYAML
commands = mypy src/obnb
[testenv:flake8]
description = Run the flake8 tool with several plugins (bandit, docstrings, import order, pep8 naming).
skip_install = true
deps =
flake8
flake8-absolute-import
# flake8-bandit
flake8-bugbear
flake8-builtins
flake8-colors
flake8-commas
flake8-comprehensions
flake8-docstrings
flake8-use-fstring
pep8-naming
pydocstyle
commands =
flake8 src/obnb/
[testenv:docs]
description = Test doc environment setup
deps=
.[doc]
-r{toxinidir}/docs/requirements.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees ./docs/source {envtmpdir}/html
[flake8]
max-line-length = 120
extend-ignore =
# Conflicting with black style slicing
E203,
# Only need docstring at class level, no need at __init__
D107,
# Temporarily ignore the following, need to fix later
D100,
D102,
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
*.pyc,
*.egg-info,
.eggs,
src/obnb/util/
src/*/base.py