-
Notifications
You must be signed in to change notification settings - Fork 23
/
pyproject.toml
215 lines (178 loc) · 5.08 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
[build-system]
requires = ['setuptools==74.1.0']
build-backend = 'setuptools.build_meta'
[project]
name = 'adaptix'
version = '3.0.0b8'
description = 'An extremely flexible and configurable data model conversion library'
readme = 'README.md'
requires-python = '>=3.9'
dependencies = [
'exceptiongroup>=1.1.3; python_version<"3.11"',
]
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Typing :: Typed',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet',
]
[project.optional-dependencies]
attrs = ['attrs >= 21.3.0']
attrs-strict = ['attrs >= 21.3.0, <= 24.2.0']
sqlalchemy = ['sqlalchemy >= 2.0.0']
sqlalchemy-strict = ['sqlalchemy >= 2.0.0, <= 2.0.32']
pydantic = ['pydantic >= 2.0.0']
pydantic-strict = ['pydantic >= 2.0.0, <= 2.8.2']
[project.urls]
'Homepage' = 'https://github.com/reagento/adaptix'
'Bug Tracker' = 'https://github.com/reagento/adaptix/issues'
'Documentation' = 'https://adaptix.readthedocs.io/en/latest/'
'Changelog' = 'https://adaptix.readthedocs.io/en/latest/reference/changelog.html'
'Source' = 'https://github.com/reagento/adaptix/'
'Download' = 'https://github.com/reagento/adaptix/#files'
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.package-data]
adaptix = ['py.typed']
[[project.authors]]
name = 'A. Tikhonov'
email = '[email protected]'
# ┌ ┐
# │ TESTING │
# └ ┘
[tool.pytest.ini_options]
python_classes = 'WeDoNotUseClassTestCase'
python_files = [
'test_*.py',
'*_test.py',
'bench_[!nexus]*.py',
'tests/tests_helpers/tests_helpers/*.py',
'local_helpers.py',
]
testpaths = ['tests', 'examples']
[tool.coverage.run]
branch = true
relative_files = true
include = ["src/**"]
[tool.coverage.report]
exclude_also = [
"^\\s*\\.\\.\\.\\s*(:?#.*)?$",
]
# ┌ ┐
# │ LINTING │
# └ ┘
[tool.mypy]
ignore_missing_imports = true
show_error_codes = true
warn_unused_configs = true
no_implicit_optional = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
disallow_subclassing_any = true
# disallow_any_generics = true # maybe turn on in the future
local_partial_types = true
[tool.isort]
multi_line_output = 3
line_length = 120
include_trailing_comma = true
combine_as_imports = true
remove_redundant_aliases = true
[tool.vulture]
min_confidence = 60
ignore_decorators = ['@_aspect_storage.add', '@overload', '@abstractmethod']
[tool.ruff]
line-length = 120
output-format = "concise"
[tool.ruff.lint]
select = ['ALL']
fixable = [
'Q000',
'Q001',
'COM812',
'D400',
'PT001',
]
ignore = [
# Rules that should be turned on in the near future
'D',
'N818',
'B904',
'FIX002',
'RUF012',
# Rules emitting false alerts
'N804',
'B008',
'BLE001',
'RUF009',
# Rules that are not applicable in the project for now
'TID252',
'D104',
'ANN',
'SLF001',
'ARG',
'D100',
'PLR0913',
'TCH002',
# Strange and obscure rules that will never be turned on
'ANN101',
'FA100',
'TRY003',
'TRY201',
'EM',
'PERF203',
'TCH001',
'TD002',
'PTH201',
'RSE102',
'TCH003',
'PYI025',
# Rules conflictin with other tools
'I001',
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ['F401']
"test_*" = ['S101', 'PLR2004', 'PLC0105', 'N806', 'FA102', 'UP035', 'UP006']
"tests/*/local_helpers.py" = ['S101', 'PLR2004', 'PLC0105', 'N806', 'FA102']
"tests/*/data_*.py" = ['F821']
"tests/tests_helpers/*" = ['INP001', 'S101']
"docs/examples/*" = [
# test ignores
'S101', 'PLR2004', 'PLC0105', 'N806', 'PT017', 'SIM105', 'FA102',
# unique ignores
'SLOT000', 'S106', 'DTZ001'
]
"scripts/*" = ['INP001']
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "list"
# ┌ ┐
# │ OTHER │
# └ ┘
[tool.towncrier]
package = 'adaptix'
filename = 'docs/changelog/changelog_body.rst'
template = 'docs/changelog/template.rst.jinja2'
issue_format = '`#{issue} <https://github.com/reagento/adaptix/issues/{issue}>`__'
directory = 'docs/changelog/fragments'
type = [
{ name = "Features", directory = "feature", showcontent = true },
{ name = "Breaking Changes", directory = "breaking", showcontent = true },
{ name = "Deprecations", directory = "deprecation", showcontent = true },
{ name = "Bug Fixes", directory = "bugfix", showcontent = true },
{ name = "Other", directory = "other", showcontent = true },
]