-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
268 lines (259 loc) · 6.57 KB
/
pyproject.toml
File metadata and controls
268 lines (259 loc) · 6.57 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
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
# pyproject.toml for github-docs-cookiecutter
#
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, Jared Cook
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[build-system]
requires = ["setuptools>=80.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "github-docs-cookiecutter"
version = "0.1.1"
description = "Github docs cookiecutter template generation."
authors = [
{ name="Jared Cook", email="jcook3701+github@gmail.com" }
]
readme = "README.md"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE.md"]
requires-python = ">=3.11"
dependencies = [
"nutri-matic>=0.1",
]
keywords = ["docs", "github-docs", "github-pages", "python3", "cookiecutter", "template", "automation"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
[project.urls]
Homepage = "https://github.com/jcook3701/github-docs-cookiecutter"
Repository = "https://github.com/jcook3701/github-docs-cookiecutter"
Documentation = "https://github.com/jcook3701/github-docs-cookiecutter/docs/jekyll"
[project.optional-dependencies]
dev = [
"bump-my-version>=1.2",
"black>=25.11",
"codespell>=2.4",
"cookiecutter>=2.6",
"cookiecutter-project-upgrader>=1.3",
"coverage>=7.12",
"deptry>=0.24",
"djlint>=1.36",
"json-lint-tools>=0.1",
"jinja2-cli>=0.8",
"jinja2-time>=0.2",
"mypy==1.9",
"nameisok>=0.1",
"pip-audit>=2.10",
"pre-commit>=4.5",
"pytest>=9.0",
"pytest-cookies>=0.7",
"pytest-cov>=7.0",
"ruff>=0.14.0",
"tomllint>=0.3",
"yamllint>=1.0",
]
docs = [
"sphinx>=8.0",
"sphinx-rtd-theme>=3.0",
"sphinx-markdown-builder>=0.6",
"sphinx-autodoc-typehints>=3.5",
]
# ====================================
# Setuptools Configuration:
# ====================================
[tool.setuptools.packages.find]
where = [
"hooks",
]
include = [
"*",
]
# ====================================
# Black Configuration: (Formatting)
# ====================================
[tool.black]
line-length = 88 # Maximum line length (default is 88)
target-version = ["py311"] # Target Python version(s)
skip-string-normalization = false # Whether to skip normalizing string quotes
include = '\.pyi?$' # Which files to include (regex)
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
# ====================================
# Version Bumping (bump-my-version):
# ====================================
[tool.bumpversion]
current_version = "0.1.1"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
tag = false
commit = false
[[tool.bumpversion.files]]
filename = "Makefile"
[[tool.bumpversion.files]]
filename = "README.md"
[[tool.bumpversion.files]]
filename = "docs/cookiecutter_input.json"
# ====================================
# Codespell Configuration:
# ====================================
[tool.codespell]
# files/patterns to ignore
skip = [
"./changelogs/*",
"cspell.json",
"./docs/jekyll/_site",
"*.svg",
"*.css",
"*.html",
"*.lock",
]
# words to ignore globally
ignore-words-list = ["crate", "ba"]
# extra options
check-filenames = true
quiet-level = 2
# ====================================
# Deptry Configuration:
# ====================================
[tool.deptry]
ignore_notebooks = true
exclude = [
"tests/*",
"docs/*",
]
# ====================================
# Djlint Configuration:
# ====================================
[tool.djlint]
profile = "jinja"
ignore = "H025,H014"
indent = 4
max_blank_lines=2
search_path = "."
use_gitignore=true
extension = "j2"
exclude = "docs/jekyll/_site/.*"
# ====================================
# Ruff Configuration:
# ====================================
[tool.ruff]
# Target Python version
target-version = "py311"
# Directories to lint and format
src = [
"hooks",
"tests",
]
# Exclude these paths
exclude = [
".venv",
"build",
"dist",
"__pycache__",
"docs",
"*.egg-info",
".git",
".github",
"*{{*cookiecutter.project_slug*}}*",
]
force-exclude = true
# Maximum line length
line-length = 120
# ====================================
# Ruff Lint Configuration:
# ====================================
[tool.ruff.lint]
# Enable linting rules
select = [
"W", # PyCodeStyle warnings
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort (import sorting)
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # comprehensions
"TID", # tidy imports
"FA", # future annotations
"PL", # pylint-style checks
"RUF", # ruff-specific
]
# Ignore specific rules
ignore = [
"E501", # line too long (handled by formatter)
"PLR2004", # magic value comparison
"B008", # function call in default argument
"RUF200", # invalid pyproject.toml file that does not conform to the relevant specifications (PEPs)
]
# ====================================
# Import Sorting Configuration: (Python helper scripts)
# ====================================
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = [
"github-docs-cookiecutter",
"hooks"
]
# ====================================
# Formatter Configuration:
# Ruff also formats YAML, TOML, and Markdown
# ====================================
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
skip-magic-trailing-comma = false
docstring-code-format = true
# ====================================
# Mypy (type-checker) Configuration:
# ====================================
[tool.mypy]
python_version = "3.11"
mypy_path = [
"hooks",
"tests",
]
strict = true
warn_unused_ignores = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
# ====================================
# Pytest Configuration:
# ====================================
[tool.pytest.ini_options]
minversion = "7.0"
addopts = ["-v", "--maxfail=1", "-W always", "-rw", "--strict-markers"]
testpaths = [
"tests",
]
pythonpath = [
"hooks",
]