-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
296 lines (266 loc) · 6.96 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"
[project]
name = "generate_changelog"
description = "Generate a changelog file from a local git checkout"
license = { text = "MIT" }
authors = [{ name = "Corey Oordt", email = "[email protected]" }]
classifiers = [
"Environment :: Console",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python",
"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 :: Build Tools",
"Topic :: Software Development :: Version Control :: Git",
]
keywords = ["changelog", "change", "git", "commit"]
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"click>=8.1.7",
"GitPython",
"jinja2",
"more-itertools",
"rich-click>=1.8.4",
"ruamel.yaml",
'typing_extensions;python_version<"3.10"',
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/callowayproject/generate_changelog"
Documentation = "https://callowayproject.github.io/generate-changelog/"
Source = "https://github.com/callowayproject/generate-changelog"
[project.scripts]
generate-changelog = "generate_changelog.cli:cli"
[project.optional-dependencies]
dev = [
"bump-my-version",
"generate-changelog",
"git-fame>=1.12.2",
]
docs = [
"black>=23.3.0",
"griffe-pydantic",
"markdown-customblocks",
"mdx-truly-sane-lists",
"mkdocs>=1.4.3",
"mkdocs-click",
"mkdocs-gen-files>=0.5.0",
"mkdocs-git-authors-plugin",
"mkdocs-git-committers-plugin",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-include-markdown-plugin",
"mkdocs-literate-nav>=0.6.0",
"mkdocs-material>=9.1.0",
"mkdocs-section-index>=0.3.5",
"mkdocstrings[python]",
"python-frontmatter"
]
test = [
"coverage[toml]",
"faker",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-mock",
]
[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = ["LICENSE"]
[tool.setuptools.packages.find]
exclude = [
"example*",
"tests*",
"docs*",
"build",
]
namespaces = false
[tool.setuptools.dynamic]
version = {attr = "generate_changelog.__version__"}
[tool.coverage.run]
branch = true
relative_files = true
omit = ["**/test_*.py"]
[tool.coverage.report]
omit = [
"*site-packages*",
"*tests*",
"*.tox*",
"*templates*",
]
show_missing = true
exclude_lines = [
"raise NotImplementedError",
"pragma: no.cover",
"pragma: no.branch"
]
[tool.pytest.ini_options]
addopts = [
"--cov=generate_changelog",
"--cov-branch",
"--cov-report=term",
"--cov-report=html",
"--cov-report=xml",
"--ignore=old"
]
norecursedirs = [
".*",
"build",
"dist",
"{arch}",
"*.egg",
"venv",
"requirements*",
"lib",
]
python_files = "test*.py"
[tool.interrogate]
ignore-init-method = true
ignore-init-module = false
ignore-magic = true
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = false
ignore-nested-functions = true
ignore-nested-classes = true
ignore-setters = false
fail-under = 95
exclude = ["setup.py", "docs", "build"]
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
verbose = 0
quiet = false
whitelist-regex = []
color = true
[tool.black]
line-length = 119
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 119
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # PEP8 naming
"B", # flake8-bugbear
"BLE", # flake8-blind except
"D", # pydocstyle
# "DOC", # pydoclint Commented out until Ruff includes configurations for this
"S", # flakeu-bandit
"RUF", # Ruff-specific rules
"NPY", # NumPy-specific rules
"PD", # Pandas-vet
"PGH", # PyGrep hooks
"ANN", # flake8-annotations
"C90", # McCabe complexity
"PLC", # Pylint conventions
"PLE", # Pylint errors
"PLW", # Pylint warnings
"TCH", # Flake8 type-checking
]
ignore = [
"ANN002", # missing-type-args
"ANN003", # missing-type-kwargs
"ANN204", # missing-return-type-special-method
"ANN401", # any-type
"S101", # assert
"S104", # hardcoded-bind-all-interfaces
"S404", # suspicious-subprocess-import
"S602", # subprocess-popen-with-shell-equals-true
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D107", # undocumented-public-init
"D200", # fits-on-one-line
"D212", # multi-line-summary-first-line
"PD011", # pandas-use-of-dot-values
"PLC0415", # import-outside-toplevel
"PLW0108", # unnecessary-lambda
"PLW1641", # eq-without-hash
]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
typing-modules = ["typing", "types", "typing_extensions", "mypy", "mypy_extensions"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR0913", "PLR0915", "PGH003", "ANN001", "ANN202", "ANN201", "PLR0912", "TRY301", "PLW0603", "PLR2004", "ANN101", "S106", "TRY201", "ANN003", "ANN002", "S105", "TRY003"]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
order-by-type = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
mypy-init-return = true
suppress-dummy-args = true
suppress-none-returning = true
[tool.pydoclint]
style = "google"
exclude = '\.git|tests'
require-return-section-when-returning-nothing = false
arg-type-hints-in-docstring = false
check-return-types = false
quiet = true
[tool.bumpversion]
allow_dirty = true
current_version = "0.12.0"
commit = true
commit_args = "--no-verify"
tag = true
tag_name = "{new_version}"
parse = '(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<dev>post)\d+\.dev\d+)?'
serialize = [
"{major}.{minor}.{patch}.{dev}{$PR_NUMBER}.dev{$REVISION}",
"{major}.{minor}.{patch}"
]
message = "Version updated from {current_version} to {new_version}"
[tool.bumpversion.parts.dev]
values = ["release", "post"]
[[tool.bumpversion.files]]
filename = "generate_changelog/__init__.py"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "Unreleased"
[[tool.bumpversion.files]]
filename = "CHANGELOG.md"
search = "{current_version}...HEAD"
replace = "{current_version}...{new_version}"