-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
115 lines (101 loc) · 2.1 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
[tox]
envlist = flake8, safety, mypy, install, py3{7,8,9,10,11}
isolated_build = true
[gh-actions]
python =
3.7: install, flake8, mypy, safety, py37
3.8: install, mypy, safety, py38
3.9: install, mypy, safety, py39
3.10: install, mypy, safety, py310
3.11: install, mypy, safety, py311
[testenv]
# Define base for all test environments.
[testenv:flake8]
skip_install = True
deps=
darglint
flake8
flake8-bandit
flake8-black
flake8-bugbear
flake8-builtins
flake8-comprehensions
flake8-docstrings
flake8-eradicate
flake8-isort
flake8-pytest-style
commands=
flake8 {toxinidir}/src/depinfo {toxinidir}/tests {toxinidir}/setup.py
[testenv:safety]
deps=
safety
commands=
safety check --full-report -i 70612
[testenv:mypy]
deps=
mypy
commands=
mypy {toxinidir}/src/depinfo
[testenv:install]
skip_install = True
deps=
build
twine
commands=
pip check {toxinidir}
python -m build {toxinidir}
twine check {toxinidir}/dist/*
[testenv:py3{7,8,9,10,11}]
deps =
pytest
pytest-cov
pytest-raises
commands =
pytest --cov=depinfo --cov-report=term {posargs}
################################################################################
# Testing tools configuration #
################################################################################
[pytest]
testpaths =
tests
markers =
raises
[coverage:paths]
source =
src/depinfo
*/site-packages/depinfo
[coverage:run]
branch = true
parallel = true
omit =
src/depinfo/_version.py
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
precision = 2
omit =
src/depinfo/_version.py
[flake8]
max-line-length = 88
exclude =
__init__.py
# The following conflict with `black` which is the more pedantic.
ignore =
E203
W503
D202
# darglint
strictness = long
docstring_style = google
[isort]
skip =
__init__.py
profile = black
indent = 4
lines_after_imports = 2
known_first_party = depinfo
known_third_party =
pytest
setuptools
versioneer