-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
266 lines (235 loc) · 6.06 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "project_forge"
description = "a tool that combines one or more templates and the user's answers to questions to generate a code project"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3.12",
]
keywords = ["project_forge"]
dynamic = ["version"]
license = { file = "LICENSE" }
requires-python = ">=3.12"
dependencies = [
"environs>=9.3.5",
"pydantic>=2.8.2",
"jinja2>=3.1.0",
"pyyaml>=6.0.2",
"tomlkit>=0.13.2",
"click>=8.1.7",
"pydantic-settings>=2.4.0",
"platformdirs>=4.2.2",
]
authors = [
{ name = "Calloway Project", email = "[email protected]" },
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://github.com/callowayproject/project-forge"
Documentation = "https://callowayproject.github.io/project_forge"
Repository = "https://github.com/callowayproject/project-forge"
Changelog = "https://github.com/callowayproject/project-forge/CHANGELOG.md"
[project.optional-dependencies]
dev = [
"bump-my-version",
"generate-changelog>=0.7.6",
"icecream",
"uv",
]
test = [
"coverage>=6.1.2",
"pre-commit>=2.15.0",
"pytest-cov>=3.0.0",
"pytest>=6.0.0",
"pytest-sugar",
]
docs = [
]
#[project.scripts]
#project-forge = project_forge.cli:cli
[tool.hatch.version]
path = "project_forge/__init__.py"
[tool.coverage.run]
branch = true
omit = ["**/test_*.py", "**/__main__.py"]
[tool.coverage.report]
omit = [
"*site-packages*",
"*tests*",
"*.tox*",
]
show_missing = true
exclude_lines = [
"raise NotImplementedError",
"pragma: no-coverage",
]
[tool.coverage.html]
directory = "test-reports/htmlcov"
[tool.pytest.ini_options]
addopts = [
"--cov=project_forge",
"--cov-branch",
"--cov-report=term",
"--cov-report=html",
]
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 = 90
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
"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
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"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
"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]
current_version = "0.1.0"
commit = true
commit_args = "--no-verify"
tag = true
tag_name = "{new_version}"
allow_dirty = true
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.(?P<dev>post)\\d+\\.dev\\d+)?"
serialize = [
"{major}.{minor}.{patch}.{dev}{$PR_NUMBER}.dev{distance_to_latest_tag}",
"{major}.{minor}.{patch}"
]
message = "Version updated from {current_version} to {new_version}"
[tool.bumpversion.parts.dev]
values = ["release", "post"]
[[tool.bumpversion.files]]
filename = "project_forge/__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}"
[[tool.bumpversion.files]]
regex = true
filename = "pyproject.toml"
search = "^version = \"{current_version}\""
replace = "version = \"{new_version}\""