-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
196 lines (179 loc) · 3.6 KB
/
pyproject.toml
File metadata and controls
196 lines (179 loc) · 3.6 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
[project]
name = "pytest-api-cov"
version = "1.3.7"
description = "Pytest Plugin to provide API Coverage statistics for Python Web Frameworks"
readme = "README.md"
authors = [{ name = "Barnaby Gill", email = "barnabasgill@gmail.com" }]
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
"pydantic>=2.0.0",
"rich>=10.0.0",
"tomli>=1.2.0",
"pytest>=6.0.0",
"PyYAML>=6.0",
"backports.strenum>=1.3.1; python_version < '3.11'",
]
[project.optional-dependencies]
django = ["django>=4.0.0"]
fastapi = ["fastapi>=0.68.0", "httpx>=0.20.0", "starlette>=0.14.0"]
flask = ["flask>=2.0.0"]
[project.urls]
Source = "https://github.com/BarnabasG/api-coverage"
[dependency-groups]
dev = [
"mypy>=1.17.0",
"path>=16.0.0",
"pytest-cov>=6.2.1",
"pytest-sugar>=1.0.0",
"pytest-xdist>=3.8.0",
"ruff>=0.12.3",
"typeguard>=4.4.4",
"vulture>=2.14",
"types-PyYAML>=6.0",
"django>=4.0.0",
"fastapi>=0.68.0",
"flask>=2.0.0",
"httpx>=0.20.0",
"starlette>=0.14.0",
"pybencher>=2.1.0",
]
# API COVERAGE
[tool.pytest_api_cov]
fail_under = 70
show_covered_endpoints = true
show_uncovered_endpoints = true
show_excluded_endpoints = true
exclusion_patterns = ["xyz"]
report_path = "reports/pytest_api_cov.json"
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/integration", "example/tests"]
pythonpath = ["src"]
[tool.coverage.report]
exclude_lines = ['if __name__ == "__main__":', "if TYPE_CHECKING:"]
show_missing = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/pytest_api_cov"]
[tool.hatch.build.targets.sdist]
include = ["src/pytest_api_cov/", "README.md", "LICENSE", "pyproject.toml"]
# [[tool.uv.index]]
# name = "testpypi"
# url = "https://test.pypi.org/simple/"
# publish-url = "https://test.pypi.org/legacy/"
# explicit = true
[project.entry-points."pytest11"]
pytest_api_cov = "pytest_api_cov.plugin"
[project.scripts]
pytest-api-cov = "pytest_api_cov.cli:main"
[tool.ruff]
src = ["src", "tests", "example"]
line-length = 120
fix = true
lint.select = [
"E", "W", # Pydocstyle
"D", # Pydocstyle
"F", # Pyflakes rules
"I", # Sort imports properly
"C90",
"N",
"S",
"YTT",
"ANN",
"ASYNC",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"EM",
"FA",
"ISC",
"T20",
"PYI",
"PT",
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
"ARG",
"PTH",
"TD",
"FIX",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
"NPY",
"PERF",
"RUF",
]
lint.ignore = [
"D203",
"D213",
"COM812",
"TRY003",
"EM101",
"E402",
"ERA001",
"FBT001",
"FBT002",
"TD002",
"TD003",
"FIX002",
"PLC0415",
"PLR0912",
"PLR0915",
"C901",
# Print statements are fine for CLI tools
"T201",
# Any types are common in plugin/interop code
"ANN401",
# Exception patterns
"EM102",
# Try-except patterns
"S110",
"S112",
# Magic numbers
"PLR2004",
# Private member access
"SLF001",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101",
"ANN",
"D100",
"PLR2004",
"SLF001",
"FBT001",
"PLR0913",
"C901",
"N806",
"D"
]
[tool.mypy]
files = ["src"]
strict = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
[tool.vulture]
exclude = []
min_confidence = 80
paths = ["src", "tests", "example"]
sort_by_size = true
verbose = false