-
-
Notifications
You must be signed in to change notification settings - Fork 129
/
pyproject.toml
225 lines (199 loc) · 5.42 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
[tool.poetry]
name = "eventsourcing"
version = "9.3.4"
description = "Event sourcing in Python"
authors = [
"John Bywater <[email protected]>",
]
license = "BSD 3-Clause"
classifiers = [
# "Development Status :: 3 - Alpha",
# "Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
]
readme = "README.md"
homepage = "https://github.com/pyeventsourcing/eventsourcing"
repository = "https://github.com/pyeventsourcing/eventsourcing"
include = ["eventsourcing/py.typed"]
keywords=[
"event sourcing",
"event store",
"domain driven design",
"domain-driven design",
"ddd",
"cqrs",
"cqs",
]
[tool.poetry.dependencies]
python = ">=3.8,<4.0"
typing_extensions = "*"
"backports.zoneinfo" = { version = "*", python = "<3.9" }
pycryptodome = { version = "~3.21", optional = true }
psycopg = { version = "<=3.2.99999", optional = true, extras=["c,pool"]}
[tool.poetry.extras]
crypto = ["pycryptodome"]
postgres = ["psycopg"]
[tool.poetry.group.dev.dependencies]
black = { version = "*", allow-prereleases = true }
coverage = "^7.2.7"
isort = "*"
mypy = "*"
psycopg = { version = "<=3.2.99999", extras = ["binary", "pool"] }
ruff = "^0.1.14"
[tool.poetry.group.docs.dependencies]
Sphinx = { version = "*"}
sphinx_rtd_theme = { version = "*"}
pydantic = { version = "~2.9"}
orjson = { version = "~3.10.11"}
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 88
target-version = ["py38"]
include = '\.pyi?$'
preview = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.pip-cache
| \.poetry
| \.venv
| \.vscode
| _build
| buck-out
| build
| dist
)/
'''
[tool.coverage.run]
branch = true
omit = []
[tool.coverage.report]
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 about some magic methods:
# "def __str__",
# # 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__.:",
# # Don't complain about empty realizations
# "pass",
# # Don't complain about abstract methods
# "@abc.abstractmethod"
]
#ignore_errors = true
#precision = 2
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 88
combine_as_imports = true
#;default_section = LOCALFOLDER
#;known_first_party = eventsourcing
#;known_standard_library = dataclasses
#;known_third_party = django
#;not_skip = __init__.py
skip = ".eggs,.pip-cache,.poetry,venv,.venv,dist"
profile = "black"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
[tool.ruff]
# Same as Black.
line-length = 88
#indent-width = 4
# Assume Python 3.8
target-version = "py38"
[tool.ruff.lint]
# Todo: "D"
#select = ["E", "F", "W", "I", "N", "UP"]
select = [
"ALL",
# "RUF012",
]
ignore = [
"UP006", # [*] Use `type` instead of `Type` for type annotation / Use `tuple` instead of `Tuple` for type annotation / etc <- ignore while supporting Python3.8
"A003", # "Class attribute `id/type` is shadowing a Python builtin
"ANN",
"D",
"PT",
"ERA",
"COM812",
"T201",
"FIX",
"S608",
"B027",
"ARG002",
"I001",
"TRY",
"BLE",
"SLF",
"C901",
"SLF",
"TD",
"PTH",
"PTH",
"DTZ005",
"PLR0915",
"PLR0912",
"SLOT",
"S101",
"FBT002",
"PLR0913",
"PGH003", # Use specific rule codes when ignoring type issues
"PLR2004", # Magic value used in comparison
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
#docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
#docstring-code-line-length = "dynamic"
[tool.ruff.pydocstyle]
convention = "google"