-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
330 lines (306 loc) · 10.4 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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[project]
authors = [
{ name = "Peter Schutt", email = "peter.github@proton.me" },
{ name = "Cody Fincher", email = "cody@litestar.dev" },
]
maintainers = [
{ name = "Litestar Developers", email = "hello@litestar.dev" },
{ name = "Cody Fincher", email = "cody@litestar.dev" },
{ name = "Jacob Coffee", email = "jacob@litestar.dev" },
{ name = "Janek Nouvertné", email = "provinzkraut@litestar.dev" },
{ name = "Peter Schutt", email = "peter@litestar.dev" },
{ name = "Visakh Unnikrishnan", email = "guacs@litestar.dev" },
{ name = "Alc", email = "alc@litestar.dev" }
]
keywords = [
"programming",
"developer",
"tools",
"litestar-org",
"dtos",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development",
"Typing :: Typed",
"Intended Audience :: Developers",
]
name = "dtos"
version = "0.1.0"
description = "Domain modelling at the edge."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9,<3.13"
dependencies = [
"type-lens>=0.1.0a0",
"msgspec>=0.18.6",
]
[project.urls]
"Issue Tracker" = "https://github.com/litestar-org/dtos/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
Changelog = "https://github.com/litestar-org/dtos/releases/"
Discord = "https://discord.gg/Litestar"
Blog = "https://blog.litestar.dev"
homepage = "https://litestar.dev/"
repository = "https://github.com/litestar-org/dtos"
documentation = "https://docs.dtos.litestar.dev/"
[tool.uv]
dev-dependencies = [
"anyio",
# - Documentation
"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",
# - Linting
"codecov-cli",
"mypy",
"pre-commit",
"pyright",
"ruff",
"slotscheck",
# - Testing
"covdefaults",
"pytest",
"pytest-cov",
"pytest-sugar",
]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.codespell]
skip = 'uv.lock'
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing"]
disable_warnings = ["no-data-collected", "module-not-measured", "module-not-imported"]
omit = ["*/tests/*"]
plugins = ["covdefaults"]
source = ["dtos"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
'class .*\bProtocol\):',
'@(abc\.)?abstractmethod',
]
fail-under = 100
[tool.pytest.ini_options]
addopts = "-ra -q --strict-markers --strict-config"
testpaths = ["tests"]
xfail_strict = true
[tool.mypy]
packages = ["dtos", "tests"]
python_version = "3.9"
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 = ["dtos", "tests"]
pythonVersion = "3.9"
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 = ["dtos", "tests", "docs/examples"]
target-version = "py39"
[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 = ["dtos", "tests", "examples"]
[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/dtos/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/dtos/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/dtos/commit/{{ previous.commit_id }}>`_ ... \
`{{ commit_id | truncate(length=7, end="") }} <https://github.com/litestar-org/dtos/commit/{{ commit_id }}>`_ \
| `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/dtos/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/dtos/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 = """
DTOs 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