-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
pyproject.toml
570 lines (532 loc) · 20.2 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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
[project]
authors = [
{ name = "Cody Fincher", email = "[email protected]" },
{ name = "Peter Schutt", email = "[email protected]" },
{ name = "Janek Nouvertné", email = "[email protected]" },
{ name = "Jacob Coffee", email = "[email protected]" },
]
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 :: Software Development",
"Typing :: Typed",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
]
dependencies = [
"sqlalchemy>=2.0.20",
"alembic>=1.12.0",
"typing-extensions>=4.0.0",
"greenlet; sys_platform == \"darwin\"",
"eval_type_backport; python_version <= \"3.9\"",
]
description = "Ready-to-go SQLAlchemy concoctions."
keywords = ["sqlalchemy", "alembic", "litestar", "sanic", "fastapi", "flask"]
license = { text = "MIT" }
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 = "advanced_alchemy"
readme = "README.md"
requires-python = ">=3.8"
version = "0.22.2"
[project.urls]
Changelog = "https://docs.advanced-alchemy.litestar.dev/latest/changelog"
Discord = "https://discord.gg/litestar"
Documentation = "https://docs.advanced-alchemy.litestar.dev/latest/"
Funding = "https://github.com/sponsors/litestar-org"
Homepage = "https://docs.advanced-alchemy.litestar.dev/latest/"
Issue = "https://github.com/litestar-org/advanced-alchemy/issues/"
Source = "https://github.com/litestar-org/advanced-alchemy"
[project.optional-dependencies]
nanoid = ["fastnanoid>=0.4.1"]
uuid = ["uuid-utils>=0.6.1"]
[dependency-groups]
cockroachdb = [
"asyncpg>=0.29.0",
"psycopg2-binary>=2.9.10",
"psycopg[binary,pool]>=3.2.3",
"sqlalchemy-cockroachdb>=2.0.2",
]
dev = [
"asgi-lifespan",
"eval-type-backport",
{ include-group = "lint" },
{ include-group = "doc" },
{ include-group = "test" },
{ include-group = "litestar" },
{ include-group = "fastapi" },
{ include-group = "flask" },
{ include-group = "sanic" },
{ include-group = "sqlite" },
{ include-group = "oracle" },
{ include-group = "duckdb" },
{ include-group = "mssql" },
{ include-group = "mysql" },
{ include-group = "spanner" },
{ include-group = "cockroachdb" },
{ include-group = "postgres" },
]
doc = [
"auto-pytabs[sphinx]>=0.5.0",
"git-cliff>=2.6.1",
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git@v3",
"sphinx>=7.0.0; python_version <= \"3.9\"",
"sphinx>=8.0.0; python_version >= \"3.10\"",
"sphinx-autobuild>=2021.3.14",
"sphinx-copybutton>=0.5.2",
"sphinx-click>=6.0.0",
"sphinx-design>=0.5.0",
"sphinxcontrib-mermaid>=0.9.2",
"sphinx-paramlinks>=0.6.0",
"sphinx-togglebutton>=0.3.2",
"sphinx-toolbox>=3.8.1",
]
duckdb = ["duckdb>=1.1.2", "duckdb-engine>=0.13.4", "pytz>=2024.2"]
fastapi = ["fastapi[all]>=0.115.3"]
flask = ["flask-sqlalchemy>=3.1.1"]
lint = [
"mypy>=1.13.0",
"pre-commit>=3.5.0",
"pyright>=1.1.386",
"ruff>=0.7.1",
"slotscheck>=0.16.5",
"asyncpg-stubs",
"types-Pillow",
"types-PyMySQL",
"types-PyYAML",
"types-Pygments",
"types-aiofiles",
"types-colorama",
"types-docutils",
"types-psycopg2",
"types-python-dateutil",
"types-pytz",
"types-ujson",
]
litestar = ["litestar[cli]>=2.12.1"]
mssql = ["aioodbc>=0.5.0", "pyodbc>=5.2.0"]
mysql = ["asyncmy>=0.2.9"]
oracle = ["oracledb>=2.4.1"]
postgres = ["asyncpg>=0.29.0", "psycopg2-binary>=2.9.10", "psycopg[binary,pool]>=3.2.3"]
sanic = ["sanic-testing>=24.6.0", "sanic[ext]>=24.6.0"]
spanner = ["sqlalchemy-spanner>=1.7.0"]
sqlite = ["aiosqlite>=0.20.0"]
test = [
"coverage>=7.6.1",
"pytest>=7.4.4",
"pytest-asyncio>=0.23.8",
"pytest-cov>=5.0.0",
"pytest-databases>=0.10.0",
"pytest-lazy-fixtures>=1.1.1",
"pytest-mock>=3.14.0",
"pytest-sugar>=1.0.0",
"pytest-xdist>=3.6.1",
"time-machine>=2.15.0",
]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.hatch.build.targets.wheel]
packages = [
"advanced_alchemy",
"advanced_alchemy.extensions.litestar",
"advanced_alchemy.extensions.sanic",
"advanced_alchemy.extensions.starlette",
]
[tool.pytest.ini_options]
addopts = ["-q", "-ra"]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources.*",
"ignore::DeprecationWarning:pkg_resources",
"ignore::DeprecationWarning:google.rpc",
"ignore::DeprecationWarning:google.gcloud",
"ignore::DeprecationWarning:google.iam",
"ignore::DeprecationWarning:google",
"ignore::DeprecationWarning:websockets.connection",
]
markers = [
"integration: SQLAlchemy integration tests",
"asyncmy: SQLAlchemy MySQL (asyncmy) Tests",
"asyncpg: SQLAlchemy Postgres (asyncpg) Tests",
"psycopg_async: SQLAlchemy Postgres (psycopg async) Tests",
"psycopg_sync: SQLAlchemy Postgres (psycopg sync) Tests",
"aiosqlite: SQLAlchemy SQLite (aiosqlite) Tests",
"sqlite: SQLAlchemy SQLite (sqlite) Tests",
"oracledb_sync: SQLAlchemy Oracle (oracledb sync) Tests",
"oracledb_async: SQLAlchemy Oracle (oracledb async) Tests",
"spanner: SQLAlchemy Google Cloud Spanner (sqlalchemy-spanner) Tests",
"duckdb: SQLAlchemy DuckDB (duckdb-engine) Tests",
"mssql_sync: SQLAlchemy Microsoft SQL Server (pyodbc) Tests",
"mssql_async: SQLAlchemy Microsoft SQL Server (aioodbc) Tests",
"mock_async: SQLAlchemy async mock Tests",
"mock_sync: SQLAlchemy sync mock Tests",
"cockroachdb_sync: SQLAlchemy CockroachDB (psycopg2) Tests",
"cockroachdb_async: SQLAlchemy CockroachDB (asyncpg) Tests",
]
testpaths = ["tests"]
[tool.coverage.run]
concurrency = ["multiprocessing"]
omit = [
"*/tests/*",
"advanced_alchemy/alembic/templates/asyncio/env.py",
"advanced_alchemy/alembic/templates/sync/env.py",
"advanced_alchemy/extensions/litestar/cli.py",
"advanced_alchemy/alembic/commands.py",
"advanced_alchemy/types.py",
"advanced_alchemy/operations.py",
"advanced_alchemy/service/*",
]
parallel = true
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'except ImportError as e:',
'except ImportError:',
'\.\.\.',
'raise NotImplementedError',
'if VERSION.startswith("1"):',
'if pydantic.VERSION.startswith("1"):',
]
[tool.black]
line-length = 120
[tool.ruff]
exclude = [".venv", "node_modules"]
line-length = 120
src = ["advanced_alchemy", "tests", "docs", "tools"]
target-version = "py38"
[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
fixable = ["ALL"]
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 black
"PLW2901", # pylint - for loop variable overwritten by assignment target
"RUF012", # Ruff-specific rule - annotated with classvar
"ANN401",
"ANN102",
"ANN101",
"FBT",
"PLR0913", # too many arguments
"PT",
"TD",
"ARG002", # ignore for now; investigate
"ARG003", # ignore for now; investigate
"PERF203", # ignore for now; investigate
"PD011", # pandas
"PLR0912",
"ISC001",
"COM812",
]
select = ["ALL"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
# keep-runtime-typing = true
[tool.ruff.lint.mccabe]
max-complexity = 14
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"sqlalchemy.ext.declarative.declared_attr",
"sqlalchemy.orm.declared_attr.directive",
"sqlalchemy.orm.declared_attr",
]
[tool.ruff.lint.per-file-ignores]
"advanced_alchemy/repository/*.py" = ['C901']
"tests/**/*.*" = [
"A",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RSE",
"S",
"S101",
"SIM",
"TCH",
"TRY",
"UP006",
"SLF001",
]
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.isort]
known-first-party = ["advanced_alchemy", "tests"]
[tool.slotscheck]
exclude-modules = '''
(
(^|\.)test_
|^tests\.*
|^tools\.*
|^docs\.*
|^examples\.*
|^sqlalchemy\.(
testing
|ext\.mypy # see slotscheck/issues/178
)
|^alembic\.testing\.suite.* # Add this line to exclude Alembic test suite
)
'''
include-modules = "advanced_alchemy.*"
require-superclass = false
strict-imports = true
[tool.mypy]
disallow_any_generics = false
disallow_untyped_decorators = true
implicit_reexport = false
packages = ["advanced_alchemy", "tests", "docs", "examples"]
python_version = "3.8"
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.mypy.overrides]]
disable_error_code = "attr-defined,type-var,union-attr"
disallow_untyped_decorators = false
module = "tests.*"
warn_unused_ignores = false
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = [
"asyncmy",
"pyodbc",
"google.auth.*",
"google.cloud.*",
"google.protobuf.*",
"pyarrow.*",
"pytest_docker.*",
"googleapiclient",
"googleapiclient.*",
"uuid_utils",
"uuid_utils.*",
]
[[tool.mypy.overrides]]
module = "advanced_alchemy._serialization"
warn_unused_ignores = false
[[tool.mypy.overrides]]
disallow_untyped_decorators = false
module = "advanced_alchemy.extensions.litestar.cli"
[[tool.mypy.overrides]]
disallow_untyped_decorators = false
module = "advanced_alchemy.types.json"
[[tool.mypy.overrides]]
module = "advanced_alchemy.service.typing"
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = "advanced_alchemy.alembic.templates.*.env"
warn_unreachable = false
[[tool.mypy.overrides]]
disable_error_code = "no-untyped-call"
disallow_untyped_decorators = false
module = "advanced_alchemy.extensions.sanic"
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = "advanced_alchemy.base"
warn_unused_ignores = false
[tool.pyright]
disableBytesTypePromotions = true
exclude = [
"docs",
"tests/unit/test_extensions",
"tests/unit/test_repository.py",
"tests/helpers.py",
"tests/docker_service_fixtures.py",
]
include = ["advanced_alchemy"]
pythonVersion = "3.8"
reportUnnecessaryTypeIgnoreComments = true
strict = ["advanced_alchemy/**/*"]
venv = ".venv"
venvPath = "."
[tool.unasyncd]
add_editors_note = true
cache = true
ruff_fix = true
update_docstrings = true
[tool.unasyncd.files]
"advanced_alchemy/repository/_async.py" = "advanced_alchemy/repository/_sync.py"
"advanced_alchemy/repository/memory/_async.py" = "advanced_alchemy/repository/memory/_sync.py"
"advanced_alchemy/service/_async.py" = "advanced_alchemy/service/_sync.py"
[tool.unasyncd.per_file_add_replacements."advanced_alchemy/repository/_async.py"]
SQLAlchemyAsyncMockRepository = "SQLAlchemySyncMockRepository"
"SQLAlchemyAsyncQueryRepository" = "SQLAlchemySyncQueryRepository"
SQLAlchemyAsyncRepository = "SQLAlchemySyncRepository"
SQLAlchemyAsyncRepositoryProtocol = "SQLAlchemySyncRepositoryProtocol"
"SQLAlchemyAsyncSlugRepository" = "SQLAlchemySyncSlugRepository"
SQLAlchemyAsyncSlugRepositoryProtocol = "SQLAlchemySyncSlugRepositoryProtocol"
"async_scoped_session" = "scoped_session"
"sqlalchemy.ext.asyncio.AsyncSession" = "sqlalchemy.orm.Session"
"sqlalchemy.ext.asyncio.scoping.async_scoped_session" = "sqlalchemy.orm.scoping.scoped_session"
[tool.unasyncd.per_file_add_replacements."advanced_alchemy/repository/memory/_async.py"]
SQLAlchemyAsyncMockRepository = "SQLAlchemySyncMockRepository"
"SQLAlchemyAsyncMockSlugRepository" = "SQLAlchemySyncMockSlugRepository"
SQLAlchemyAsyncRepository = "SQLAlchemySyncRepository"
SQLAlchemyAsyncRepositoryProtocol = "SQLAlchemySyncRepositoryProtocol"
"SQLAlchemyAsyncSlugRepository" = "SQLAlchemySyncSlugRepository"
SQLAlchemyAsyncSlugRepositoryProtocol = "SQLAlchemySyncSlugRepositoryProtocol"
"advanced_alchemy.repository._async.SQLAlchemyAsyncRepositoryProtocol" = "advanced_alchemy.repository._sync.SQLAlchemySyncRepositoryProtocol"
"advanced_alchemy.repository._async.SQLAlchemyAsyncSlugRepositoryProtocol" = "advanced_alchemy.repository._sync.SQLAlchemySyncSlugRepositoryProtocol"
"async_scoped_session" = "scoped_session"
"sqlalchemy.ext.asyncio.AsyncEngine" = "sqlalchemy.Engine"
"sqlalchemy.ext.asyncio.AsyncSession" = "sqlalchemy.orm.Session"
"sqlalchemy.ext.asyncio.scoping.async_scoped_session" = "sqlalchemy.orm.scoping.scoped_session"
[tool.unasyncd.per_file_add_replacements."advanced_alchemy/service/_async.py"]
"AsyncIterator" = "Iterator"
"SQLAlchemyAsyncConfigT" = "SQLAlchemySyncConfigT"
SQLAlchemyAsyncMockRepository = "SQLAlchemySyncMockRepository"
SQLAlchemyAsyncMockSlugRepository = "SQLAlchemySyncMockSlugRepository"
SQLAlchemyAsyncQueryService = "SQLAlchemySyncQueryService"
SQLAlchemyAsyncRepository = "SQLAlchemySyncRepository"
SQLAlchemyAsyncRepositoryReadService = "SQLAlchemySyncRepositoryReadService"
SQLAlchemyAsyncRepositoryService = "SQLAlchemySyncRepositoryService"
SQLAlchemyAsyncSlugRepository = "SQLAlchemySyncSlugRepository"
"advanced_alchemy.config.asyncio.SQLAlchemyAsyncConfig" = "advanced_alchemy.config.sync.SQLAlchemySyncConfig"
"advanced_alchemy.repository.SQLAlchemyAsyncQueryRepository" = "advanced_alchemy.repository.SQLAlchemySyncQueryRepository"
"advanced_alchemy.repository.SQLAlchemyAsyncRepository" = "advanced_alchemy.repository.SQLAlchemySyncRepository"
"advanced_alchemy.repository.SQLAlchemyAsyncRepositoryProtocol" = "advanced_alchemy.repository.SQLAlchemySyncRepositoryProtocol"
"advanced_alchemy.repository.SQLAlchemyAsyncSlugRepository" = "advanced_alchemy.repository.SQLAlchemySyncSlugRepository"
"advanced_alchemy.repository.SQLAlchemyAsyncSlugRepositoryProtocol" = "advanced_alchemy.repository.SQLAlchemySyncSlugRepositoryProtocol"
"advanced_alchemy.repository.memory.SQLAlchemyAsyncMockRepository" = "advanced_alchemy.repository.memory.SQLAlchemySyncMockRepository"
"advanced_alchemy.repository.memory.SQLAlchemyAsyncMockSlugRepository" = "advanced_alchemy.repository.memory.SQLAlchemySyncMockSlugRepository"
"async_scoped_session" = "scoped_session"
"collections.abc.AsyncIterator" = "collections.abc.Iterator"
"sqlalchemy.ext.asyncio.AsyncSession" = "sqlalchemy.orm.Session"
"sqlalchemy.ext.asyncio.scoping.async_scoped_session" = "sqlalchemy.orm.scoping.scoped_session"
[tool.codespell]
ignore-words-list = "selectin"
skip = 'pdm.lock, examples/us_state_lookup.json, docs/_static/favicon.svg'
[tool.git-cliff.changelog]
header = """
=========
Changelog
=========\n
All commits to this project will be documented in this file.\n
"""
trim = true
# TODO: Fix footers for co-authors
body = """
{% if version %}\
`Release [v{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} <https://github.com/litestar-org/advanced-alchemy/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/advanced-alchemy/commits/v{{ version | trim_start_matches(pat="v") }}>`_
{% else %}\
[unreleased]
------------
{% if previous %}\
{% if previous.commit_id %}
`{{ previous.commit_id | default(value='') | truncate(length=7, end='') }} <https://github.com/litestar-org/advanced-alchemy/commit/{{ previous.commit_id }}>`_ is the last commit in the changelog before unreleased changes.
{% endif %}\
{% else %}
`Initial commit`
{% endif %}
{% endif %}\
{% if previous %}\
{% if previous.commit_id and version %}
`{{ previous.commit_id | default(value='') | truncate(length=7, end='') }} <https://github.com/litestar-org/advanced-alchemy/commit/{{ previous.commit_id }}>`_ ... \
`{{ commit_id | default(value='') | truncate(length=7, end='') }} <https://github.com/litestar-org/advanced-alchemy/commit/{{ commit_id }}>`_ \
| `See diff for {{ version | trim_start_matches(pat="v") }} <https://github.com/litestar-org/advanced-alchemy/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 | default(value='') | truncate(length=7, end='') }} <https://github.com/litestar-org/advanced-alchemy/commit/{{ commit.id }}>`_) {% if commit.breaking %}[**breaking**] {% endif %} - {{ commit.message | upper_first }} {% if commit.github.username %} by `@{{ commit.github.username }} <https://github.com/{{ commit.github.username }}>`_ {%- endif %}\
{% if commit.github.pr_number %} in `#{{ commit.github.pr_number }} <https://github.com/litestar-org/advanced-alchemy/pull/{{ commit.github.pr_number }}>`_ {%- endif %}\
{% endfor %}
{% endfor %}\n
"""
footer = """
Advanced Alchemy Changelog
"""
[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" },
]
commit_preprocessors = [
# Matches a single backtick that is not preceded by another backtick (negative lookbehind)
# and not followed by another backtick (negative lookahead).. but these aren't supported
# in git cliff regexes. So we have to do it in 3 steps:
# Step 1: Replace pairs of backticks with a placeholder (e.g., "DOUBLEBACKTICK")
{ pattern = "``", replace = "DOUBLEBACKTICK" },
# Step 2: Replace single backticks with double backticks
{ pattern = "`", replace = "``" },
# Step 3: Replace the placeholder back to double backticks
{ pattern = "DOUBLEBACKTICK", replace = "``" },
# TODO: Fix Co-authored commits
]
conventional_commits = true
filter_commits = false
filter_unconventional = true
ignore_tags = ""
link_parsers = [
# TODO: Supposedly matches on #1234 but doesn't work?
{ pattern = "\\(#(\\d+)\\)", href = "https://github.com/litestar-org/advanced-alchemy/issues/$1" },
]
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
[tool.git-cliff.remote.github]
owner = "litestar-org"
repo = "advanced-alchemy"