-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
107 lines (96 loc) · 2.13 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
[tox]
envlist = lint,typing,py38,py39,py310,py311,py312,py313,pypy3,py-oldsetup
skip_missing_interpreters = True
isolated_build = True
minversion = 3.3.0
[testenv]
deps =
build>=0.7 # Must be a version that builds wheels from sdists
editables
hatchling
setuptools>=42
pip
pydantic~=2.0
pytest
pytest-cov
pytest-mock
wheel
commands =
pytest {posargs:-v} test
[testenv:py-oldsetup]
deps =
build>=0.7 # Must be a version that builds wheels from sdists
hatchling
setuptools<64
pip
pydantic~=2.0
pytest
pytest-cov
pytest-mock
wheel
commands =
pytest {posargs:-v} --oldsetup test
[testenv:lint]
skip_install = True
deps =
flake8
flake8-bugbear
flake8-builtins
flake8-unused-arguments
commands =
flake8 src test
[testenv:typing]
deps =
mypy
types-setuptools
{[testenv]deps}
commands =
mypy src test
[pytest]
addopts =
--cov=versioningit
# Explicitly setting the path to the coverage config file is necessary due
# to some tests spawning subprocesses with changed working directories.
--cov-config=tox.ini
--no-cov-on-fail
filterwarnings = error
markers =
describe_exclude: Tests that use `git describe --exclude` (Added in Git 2.13.0)
oldsetup: Tests to only run under pre-v64 setuptools
norecursedirs = test/data
[coverage:run]
branch = True
parallel = True
[coverage:paths]
source =
src
.tox/**/site-packages
[coverage:report]
precision = 2
show_missing = True
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
\.\.\.
[flake8]
doctests = True
extend-exclude = build/,dist/,test/data,venv/
max-doc-length = 100
max-line-length = 80
unused-arguments-ignore-stub-functions = True
extend-select = B901,B902,B950
ignore = A003,A005,B005,E203,E262,E266,E501,E704,U101,W503
[isort]
atomic = True
force_sort_within_sections = True
honor_noqa = True
lines_between_sections = 0
profile = black
reverse_relative = True
sort_relative_in_force_sorted_sections = True
src_paths = src
[testenv:docs]
basepython = python3
deps = -rdocs/requirements.txt
changedir = docs
commands = sphinx-build -E -W -b html . _build/html