-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpyproject.toml
148 lines (130 loc) · 3.75 KB
/
pyproject.toml
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[tool.pytest.ini_options]
filterwarnings = ["error"]
addopts = """--ignore=test/benchmark \
--ignore=test/query/handlers/babel \
--allow-hosts=127.0.0.1,127.0.1.1,::1"""
[tool.coverage.run]
command_line = "-m pytest"
branch = false
parallel = true
include = ["./*"]
omit = [
".tox/*",
"demo/*",
"test/*",
"main.py",
"__init__.py",
"calculate_anything/appdirs.py"
]
[tool.coverage.report]
ignore_errors = false
show_missing = true
include = ["./*"]
omit = [
".tox/*",
"demo/*",
"test/*",
"main.py",
"__init__.py",
"calculate_anything/appdirs.py"
]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"# pragma: no cover",
# Ignore pass
"^\\s*pass\\s*$",
# Ignore Ellipsis (...)
"^\\s*\\.\\.\\.\\s*$",
"^\\s*Ellipsis\\s*$"
]
[tool.coverage.html]
directory = "cover/html/"
[tool.coverage.xml]
output = "cover/xml/coverage.xml"
[tool.flake8]
max-line-length = 80
ignore = [
"E203",
"W503"
]
[tool.black]
line-length = 80
skip-string-normalization = true
[tool.tox]
legacy_tox_ini = """
[tox]
skipsdist = true
minversion = 3.24.1
recreate = false
envlist = clean,linting,codestyle,py{37,38,39,310,311},babel_py{37,38,39,310,311},coverage,benchmark
[testenv:clean]
deps = -r{toxinidir}/requirements/test-requirements.txt
commands = coverage erase
[testenv:linting]
deps = -r{toxinidir}/requirements/linting-requirements.txt
commands =
pflake8 {toxinidir} --count --show-source --statistics
pflake8 {toxinidir} --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
[testenv:codestyle]
deps = -r{toxinidir}/requirements/linting-requirements.txt
commands = black --check {toxinidir}/
[testenv:coverage]
commands =
coverage combine
coverage report
coverage html
coverage xml
[testenv]
platform = linux2?|darwin|win32
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
commands = coverage run
[testenv:babel_py37]
platform = linux2?|darwin
basepython = python3.7
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
-r{toxinidir}/requirements/optional-requirements.txt
commands = coverage run -m pytest {toxinidir}/test/query/handlers/babel
[testenv:babel_py38]
platform = linux2?|darwin
basepython = python3.8
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
-r{toxinidir}/requirements/optional-requirements.txt
commands = coverage run -m pytest {toxinidir}/test/query/handlers/babel
[testenv:babel_py310]
platform = linux2?|darwin
basepython = python3.10
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
-r{toxinidir}/requirements/optional-requirements.txt
commands = coverage run -m pytest {toxinidir}/test/query/handlers/babel
[testenv:babel_py311]
platform = linux2?|darwin
basepython = python3.11
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
-r{toxinidir}/requirements/optional-requirements.txt
commands = coverage run -m pytest {toxinidir}/test/query/handlers/babel
[testenv:babel_py39]
platform = linux2?|darwin
basepython = python3.9
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
-r{toxinidir}/requirements/optional-requirements.txt
commands = coverage run -m pytest {toxinidir}/test/query/handlers/babel
[testenv:benchmark]
basepython = python3.9
deps =
-r{toxinidir}/requirements/requirements.txt
-r{toxinidir}/requirements/test-requirements.txt
commands = pytest {toxinidir}/test/benchmark/ --benchmark-json benchmark-python3.9.json
"""