forked from gcovr/gcovr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
201 lines (175 loc) · 4.77 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
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
197
198
199
200
201
[build-system]
requires = [
"hatchling==1.26.1",
"hatch-vcs==0.4.0",
"hatch-fancy-pypi-readme==24.1.0"
]
build-backend = "hatchling.build"
[project]
dynamic = [
"version",
"readme",
]
name = "gcovr"
license = "BSD-3-Clause"
license-files = [
"LICENSE.txt"
]
authors = [
{ name="Lukas Atkinson", email="[email protected]" },
{ name="Michael Förderer", email="[email protected]" }, # cspell:ignore Förderer
]
description = "Generate C/C++ code coverage reports with gcov"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
keywords = [
"gcc",
"gcov",
"coverage",
"lcov",
"Cobertura",
"Jenkins",
]
dependencies = [
"jinja2",
"lxml",
"colorlog",
"pygments>=2.13.0",
"tomli >= 1.1.0 ; python_version < '3.11'",
]
[project.scripts]
gcovr = "gcovr.__main__:main"
[project.urls]
Documentation = "https://gcovr.com"
Github = "https://github.com/gcovr/gcovr"
Issues = "https://github.com/gcovr/gcovr/issues"
[tool.hatch.build.targets.wheel]
packages = [
"src/gcovr"
]
[tool.hatch.build.targets.sdist]
include = [
"src/gcovr/",
]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
pattern = '\.\. image:: \./'
# The variable reference is replaced with the packaged version by fancy-pypi-readme
replacement = '.. image:: https://raw.githubusercontent.com/gcovr/gcovr/$HFPR_VERSION/'
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/gcovr/version.py"
template = """\
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = {version!r}
"""
[tool.pylint]
ignore-paths = [
"tests/*",
]
fail-under = 9.99
disable = [
"unknown-option-value", # This is because we are testing with several versions
"Format",
"logging-fstring-interpolation",
"missing-module-docstring",
"no-member",
"too-few-public-methods",
# Deactivate "too-many-..." for now
"too-many-locals",
"too-many-nested-blocks",
"too-many-branches",
"too-many-statements",
"too-many-arguments",
"too-many-positional-arguments",
"too-many-instance-attributes",
"R0801" # Similar lines
]
extension-pkg-allow-list = [
"lxml",
"gcovr"
]
[tool.mypy]
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
extra_checks = true
disable_error_code = "attr-defined"
exclude = [
"build/.*"
]
[tool.ruff]
exclude = [
"__pycache__",
"tests/cmake_gtest/build/_deps",
"src/gcovr/version.py",
]
[tool.ruff.lint]
# 1. Enable flake8-bugbear (`B`) rules, in addition to the defaults.
select = ["E4", "E7", "E9", "F", "B"]
# 2. Avoid enforcing line-length violations (`E501`)
ignore = ["E501"]
# 3. Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
# 4. Ignore `E402` (import violations) in all `__init__.py` files, and in selected subdirectories.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]
[tool.ruff.format]
# 5. Use double quotes in `ruff format`.
quote-style = "double"
[tool.bandit]
assert_used.skips = [
"*_test.py",
"*test_*.py"
]
[tool.pytest.ini_options]
addopts = "-v --timeout=120 --doctest-modules --ignore-glob=*/linked/subdir/* --ignore-glob */*bazel*/* --ignore-glob */.nox*/*"
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = [
"[#]\\s*pragma: no cover",
"^\\s*raise AssertionError\\b",
"^\\s*raise NotImplementedError\\b"
]
[tool.coverage.html]
directory = "htmlcov"