generated from litestar-org/litestar-hello-world-stale
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
247 lines (226 loc) · 6.89 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
[project]
name = "app"
version = "0.1.0"
description = "A minimal template for Litestar based projects"
authors = [
{ name = "Jacob Coffee", email = "[email protected]" },
]
dependencies = [
"python-dotenv>=1.0.0",
"litestar[standard]>=2.0.0b4",
"pre-commit>=4.0.1",
]
requires-python = ">=3.11,<4.0"
readme = "README.md"
license = { text = "MIT" }
[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.pdm]
[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.4.0",
"coverage>=7.2.7",
"pytest-benchmark>=4.0.0",
"pytest-cov>=4.1.0",
"pytest-dotenv>=0.5.2",
"pytest-mock>=3.11.1",
"hypothesis>=6.82.0",
"pytest-asyncio>=0.21.1",
"pytailwindcss>=0.2.0",
]
docs = [
"sphinx>=7.1.0",
"sphinx-autobuild>=2021.3.14",
"sphinx-copybutton>=0.5.2",
"shibuya>=2023.7.16",
"sphinx-click>=4.4.0",
"sphinx-toolbox>=3.5.0",
]
lint = [
"sourcery>=1.6.0",
"black>=23.7.0",
"ruff>=0.0.280",
"codespell>=2.2.5",
"mypy>=1.4.1",
"pre-commit>=3.3.3",
"pip-audit>=2.6.1",
]
[tool.pdm.build]
includes = []
[tool.black]
line-length = 120
include = '\.pyi?$'
[tool.codespell]
ignore-words-list = "selectin"
[tool.coverage.run]
omit = ["*/tests/*"]
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'except ImportError as e:',
'except ImportError:',
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources.*",
"ignore::DeprecationWarning:sphinxcontrib",
]
[tool.mypy]
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_return_any = true
strict = true
disallow_untyped_decorators = true
disallow_any_generics = false
implicit_reexport = false
show_error_codes = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_decorators = false
[tool.ruff]
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
]
ignore = [
"RUF012", # Ruff-specific rule - annotated with classvar
]
line-length = 120
src = ["app", "tests"]
target-version = "py311"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.pep8-naming]
classmethod-decorators = [
"classmethod",
]
[tool.ruff.isort]
known-first-party = ["app", "tests"]
[tool.ruff.per-file-ignores]
"tests/**/*.*" = [
"A",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RSE",
"S",
"S101",
"SIM",
"TCH",
"TRY",
]
"docs/**/*.*" = ["S", "B", "DTZ", "A", "TCH", "ERA", "D", "RET"]
"tools/**/*.*" = ["D", "ARG", "EM", "TRY", "G", "FBT"]
[tool.git-cliff.changelog]
header = """
=========
Changelog
=========\n
All commits to this project will be documented in this file.\n
"""
body = """
{% if version %}\
`Release [v{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} <https://github.com/JacobCoffee/litestar-template/releases/tag/v{{ version | trim_start_matches(pat="v") }}>`_
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* `See All commits in v{{ version | trim_start_matches(pat="v") }} <https://github.com/JacobCoffee/litestar-template/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/JacobCoffee/litestar-template/commit/{{ previous.commit_id }}>`_ ... \
`{{ commit_id | truncate(length=7, end="") }} <https://github.com/JacobCoffee/litestar-template/commit/{{ commit_id }}>`_ \
| `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/JacobCoffee/litestar-template/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/JacobCoffee/litestar-template/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
"""
trim = true
footer = """
Litestar Template Changelog
"""
[tool.git-cliff.git]
conventional_commits = true
filter_unconventional = true
split_commits = false
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\\(no-changelog\\):", skip = true },
{ message = "^chore", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "Security" },
]
protect_breaking_commits = false
filter_commits = false
tag_pattern = "v[0-9]*"
skip_tags = "v0.1.0-beta.1"
ignore_tags = ""
topo_order = false
sort_commits = "oldest"