generated from jolt-org/project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
313 lines (291 loc) · 10.1 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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
[project]
authors = [
{ name = "Peter Schutt", email = "[email protected]" },
]
maintainers = [
{ name = "Litestar Developers", email = "[email protected]" },
{ name = "Cody Fincher", email = "[email protected]" },
{ name = "Jacob Coffee", email = "[email protected]" },
{ name = "Janek Nouvertné", email = "[email protected]" },
{ name = "Peter Schutt", email = "[email protected]" },
{ name = "Visakh Unnikrishnan", email = "[email protected]" },
{ name = "Alc", email = "[email protected]" },
{ name = "Dan Cardin", email = "[email protected]" },
]
keywords = [
"programming",
"developer",
"tools",
"litestar-org",
"type-lens",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"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",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development",
"Typing :: Typed",
"Intended Audience :: Developers",
]
name = "type-lens"
version = "0.2.3"
description = "type-lens is a Python template project designed to simplify the setup of a new project."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.8,<4.0"
dependencies = [
"eval-type-backport; python_version<'3.10'",
"typing-extensions >= 4.1.0",
]
[project.urls]
"Issue Tracker" = "https://github.com/litestar-org/type-lens/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
Changelog = "https://github.com/litestar-org/type-lens/releases/"
Discord = "https://discord.gg/litestar"
Blog = "https://blog.litestar.dev"
homepage = "https://litestar.dev/"
repository = "https://github.com/litestar-org/type-lens"
documentation = "https://docs.type-lens.litestar.dev/"
[tool.pdm.dev-dependencies]
docs = [
"auto-pytabs[sphinx]>=0.4.0",
"sphinx-autobuild>=2021.3.14",
"sphinx-click>=4.4.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.5.0",
"sphinx-toolbox>=3.5.0",
"sphinx>=7.1.2",
"sphinxcontrib-mermaid>=0.9.2",
"sphinx-paramlinks>=0.6.0",
"sphinx-togglebutton>=0.3.2",
# "litestar-sphinx-theme @ {root:uri}/../litestar-sphinx-theme", # only needed when working on the theme
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git@v3",
]
lint = [
"codecov-cli",
"mypy == 1.11.2",
"pre-commit",
"pyright",
"ruff",
"slotscheck",
]
test = [
"covdefaults",
"pytest",
"pytest-cov",
]
[tool.pdm.scripts]
ci = { composite = ["lint", "test"] }
docs-serve = "sphinx-autobuild docs docs/_build/ -j auto --watch dtos --watch docs --watch tests --port 8002"
lint = "pre-commit run --all-files"
test = "pytest"
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.codespell]
ignore-words-list = "te"
skip = 'pdm.lock'
[tool.coverage.run]
omit = ["*/tests/*"]
plugins = ["covdefaults"]
source = ["type_lens"]
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config"
testpaths = ["tests"]
xfail_strict = true
[tool.mypy]
packages = ["type_lens", "tests"]
python_version = "3.8"
disallow_any_generics = false
disallow_untyped_decorators = true
enable_error_code = "ignore-without-code"
implicit_reexport = false
show_error_codes = true
strict = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pyright]
disableBytesTypePromotions = true
exclude = [
"tools",
"docs",
]
include = ["type_lens", "tests"]
pythonVersion = "3.8"
reportUnnecessaryTypeIgnoreComments = true
[tool.slotscheck]
strict-imports = false
[tool.ruff]
lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"ERA", # eradicate
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PLC", # pylint - convention
"PLE", # pylint - error
"PLW", # pylint - warning
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle - warning
"YTT", # flake8-2020
]
line-length = 120
lint.ignore = [
"A003", # flake8-builtins - class attribute {name} is shadowing a python builtin
"B010", # flake8-bugbear - do not call setattr with a constant attribute value
"D100", # pydocstyle - missing docstring in public module
"D101", # pydocstyle - missing docstring in public class
"D102", # pydocstyle - missing docstring in public method
"D103", # pydocstyle - missing docstring in public function
"D104", # pydocstyle - missing docstring in public package
"D105", # pydocstyle - missing docstring in magic method
"D106", # pydocstyle - missing docstring in public nested class
"D107", # pydocstyle - missing docstring in __init__
"D202", # pydocstyle - no blank lines allowed after function docstring
"D205", # pydocstyle - 1 blank line required between summary line and description
"D415", # pydocstyle - first line should end with a period, question mark, or exclamation point
"E501", # pycodestyle line too long, handled by ruff format
"PLW2901", # pylint - for loop variable overwritten by assignment target
"RUF012", # Ruff-specific rule - annotated with classvar
"ISC001", # Ruff formatter incompatible
]
src = ["type_lens", "tests", "docs/examples"]
target-version = "py38"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 12
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"classmethod",
]
[tool.ruff.lint.isort]
known-first-party = ["type_lens", "tests"]
[tool.ruff.lint.per-file-ignores]
"docs/**/*.*" = ["S", "B", "DTZ", "A", "TCH", "ERA", "D", "RET"]
"docs/examples/**" = ["T201"]
"tests/**/*.*" = [
"A",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RSE",
"S",
"S101",
"SIM",
"TCH",
"TRY",
]
"tools/**/*.*" = ["D", "ARG", "EM", "TRY", "G", "FBT"]
"tools/prepare_release.py" = ["S603", "S607"]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 88
[tool.git-cliff.changelog]
body = """
{% if version %}\
`Release [v{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} <https://github.com/litestar-org/type-lens/releases/tag/v{{ version | trim_start_matches(pat="v") }}>`_
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* `See All commits in v{{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/type-lens/commits/v{{ version | trim_start_matches(pat="v") }}>`_
{% else %}\
[unreleased]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{% endif %}\
{% if previous %}\
{% if previous.commit_id %}
`{{ previous.commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/type-lens/commit/{{ previous.commit_id }}>`_ ... \
`{{ commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/type-lens/commit/{{ commit_id }}>`_ \
| `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/type-lens/compare/{{ previous.commit_id }}...{{ commit_id }}>`_
{% endif %}\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
{{ group | upper_first }}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{% for commit in commits %}
* (`{{ commit.id | truncate(length=7, end="") }} <https://github.com/litestar-org/type-lens/commit/{{ commit.id }}>`_) {% if commit.breaking %}[**breaking**] {% endif %} - {{ commit.message | upper_first }} ({{ commit.author.name }})\
{% for footer in commit.footers -%}
, {{ footer.token }}{{ footer.separator }}{{ footer.value }}\
{% endfor %}\
{% endfor %}
{% endfor %}\n
"""
footer = """
Type Lens Changelog
"""
header = """
=========
Changelog
=========\n
All commits to this project will be documented in this file.\n
"""
trim = true
[tool.git-cliff.git]
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^style", group = "Styling" },
{ message = "^test", group = "Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "Security" },
]
conventional_commits = true
filter_commits = false
filter_unconventional = true
ignore_tags = ""
protect_breaking_commits = false
skip_tags = "v0.1.0-beta.1"
sort_commits = "oldest"
split_commits = false
tag_pattern = "v[0-9]*"
topo_order = false