aliceio

Форк
0
/
pyproject.toml 
261 строка · 5.0 Кб
1
[build-system]
2
requires = ["hatchling"]
3
build-backend = "hatchling.build"
4

5
[project]
6
name = "aliceio"
7
description = "Asynchronous framework for Alice from Yandex Dialogs"
8
readme = "README.md"
9
requires-python = ">=3.8"
10
license = { file = "LICENSE" }
11
authors = [{ name = "K1rL3s - Kirill Lesovoy" }]
12
maintainers = [{ name = "K1rL3s - Kirill Lesovoy" }]
13
keywords = [
14
  "alice",
15
  "yandex",
16
  "aliceio",
17
  "bot",
18
  "api",
19
  "framework",
20
  "wrapper",
21
  "asyncio",
22
]
23
classifiers = [
24
  "License :: OSI Approved :: MIT License",
25
  "Development Status :: 5 - Production/Stable",
26
  "Environment :: Console",
27
  "Framework :: AsyncIO",
28
  "Typing :: Typed",
29
  "Intended Audience :: Developers",
30
  "Intended Audience :: System Administrators",
31
  "Programming Language :: Python :: 3.8",
32
  "Programming Language :: Python :: 3.9",
33
  "Programming Language :: Python :: 3.10",
34
  "Programming Language :: Python :: 3.11",
35
  "Programming Language :: Python :: 3.12",
36
  "Topic :: Software Development :: Libraries :: Application Frameworks",
37
  "Topic :: Software Development :: Libraries :: Python Modules",
38
  "Topic :: Communications :: Chat",
39
]
40
dependencies = [
41
  "aiofiles~=23.2.1",
42
  "aiohttp~=3.9.0",
43
  "certifi>=2023.7.22",
44
  "magic-filter>=1.0.12,<1.1",
45
  "pydantic>=2.4.1,<2.6",
46
  "typing-extensions>=4.7.0,<=5.0",
47
]
48

49
dynamic = ["version"]
50
[tool.hatch.version]
51
path = "aliceio/__meta__.py"
52

53
[project.optional-dependencies]
54
fast = [
55
  "uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy'",
56
  "aiodns>=3.0.0",
57
]
58
redis = [
59
  "redis[hiredis]~=5.0.1",
60
]
61
proxy = [
62
  "aiohttp-socks~=0.8.3",
63
]
64
test = [
65
  "pytest~=7.4.2",
66
  "pytest-html~=4.0.2",
67
  "pytest-asyncio~=0.21.1",
68
  "pytest-lazy-fixture~=0.6.3",
69
  "pytest-mock~=3.12.0",
70
  "pytest-mypy~=0.10.3",
71
  "pytest-cov~=4.1.0",
72
  "pytest-aiohttp~=1.0.5",
73
  "aresponses~=2.1.6",
74
  "pytz~=2023.3",
75
  "pycryptodomex~=3.19.0",
76
]
77
dev = [
78
  "black~=23.10.0",
79
  "isort~=5.12.0",
80
  "ruff~=0.1.1",
81
  "mypy~=1.6.1",
82
  "toml~=0.10.2",
83
  "pre-commit~=3.5.0",
84
  "packaging~=23.1",
85
]
86
docs = [
87
  "mkdocs~=1.5.3",
88
  "mkdocs_material~=9.5.5",
89
  "mkdocstrings~=0.24.0",
90
  "mkdocstrings_python~=1.8.0"
91
]
92

93
[project.urls]
94
Documentation = "https://aliceio.rtfd.io"
95
Repository = "https://github.com/K1rL3s/aliceio"
96

97
[tool.hatch.envs.default]
98
features = [
99
  "dev",
100
  "fast",
101
  "redis",
102
  "proxy",
103
]
104
post-install-commands = [
105
  "pre-commit install",
106
]
107

108
[tool.hatch.envs.default.scripts]
109
reformat = [
110
  "black aliceio tests",
111
  "isort aliceio tests",
112
]
113
lint = "ruff aliceio"
114

115
[tool.hatch.envs.docs]
116
features = [
117
  "fast",
118
  "redis",
119
  "proxy",
120
  "docs",
121
]
122

123
[tool.hatch.envs.dev]
124
python = "3.12"
125
features = [
126
  "dev",
127
  "fast",
128
  "redis",
129
  "proxy",
130
  "test",
131
]
132

133
[tool.hatch.envs.test]
134
features = [
135
  "fast",
136
  "redis",
137
  "proxy",
138
  "test",
139
]
140

141
[tool.hatch.envs.test.scripts]
142
cov = [
143
  "pytest --cov-config pyproject.toml --cov=aliceio --html=reports/py{matrix:python}/tests/index.html {args}",
144
  "coverage html -d reports/py{matrix:python}/coverage",
145
]
146
cov-redis = [
147
  "pytest --cov-config pyproject.toml --cov=aliceio --html=reports/py{matrix:python}/tests/index.html --redis {env:REDIS_DNS:'redis://localhost:6379'} {args}",
148
  "coverage html -d reports/py{matrix:python}/coverage",
149
]
150
view-cov = "google-chrome-stable reports/py{matrix:python}/coverage/index.html"
151

152

153
[[tool.hatch.envs.test.matrix]]
154
python = ["38", "39", "310", "311", "312"]
155

156
[tool.ruff]
157
line-length = 88
158
select = [
159
  "C",
160
  "C4",
161
  "E",
162
  "F",
163
  "T10",
164
  "T20",
165
  "Q",
166
  "RET",
167
]
168
ignore = [
169
  "F401"
170
]
171
src = ["aliceio", "tests"]
172
exclude = [
173
  ".git",
174
  "build",
175
  "dist",
176
  "venv",
177
  ".venv",
178
  "docs",
179
  "tests",
180
  "dev",
181
  "scripts",
182
  "*.egg-info",
183
]
184
target-version = "py38"
185

186
[tool.pytest.ini_options]
187
asyncio_mode = "auto"
188
testpaths = [
189
  "tests",
190
]
191
filterwarnings = [
192
  "error",
193
  "ignore::pytest.PytestUnraisableExceptionWarning",
194
]
195

196
[tool.coverage.run]
197
branch = false
198
parallel = true
199
omit = [
200
  "aliceio/__about__.py",
201
]
202

203
[tool.coverage.report]
204
exclude_lines = [
205
  "if __name__ == .__main__.:",
206
  "pragma: no cover",
207
  "if TYPE_CHECKING:",
208
  "@abstractmethod",
209
  "@overload",
210
]
211

212
[tool.mypy]
213
plugins = "pydantic.mypy"
214
python_version = "3.8"
215
show_error_codes = true
216
show_error_context = true
217
pretty = true
218
ignore_missing_imports = false
219
warn_unused_configs = true
220
disallow_subclassing_any = true
221
disallow_any_generics = true
222
disallow_untyped_calls = true
223
disallow_untyped_defs = true
224
disallow_incomplete_defs = true
225
check_untyped_defs = true
226
disallow_untyped_decorators = true
227
no_implicit_optional = true
228
warn_redundant_casts = true
229
warn_unused_ignores = true
230
warn_return_any = true
231
follow_imports_for_stubs = true
232
namespace_packages = true
233
show_absolute_path = true
234

235
[[tool.mypy.overrides]]
236
module = [
237
  "aiofiles",
238
  "async_lru",
239
  "uvloop",
240
  "redis.*",
241
]
242
ignore_missing_imports = true
243
disallow_untyped_defs = true
244

245
[tool.black]
246
line-length = 88
247
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
248
exclude = '''
249
(
250
    \.eggs
251
  | \.git
252
  | \.tox
253
  | build
254
  | dist
255
  | venv
256
  | docs
257
)
258
'''
259

260
[tool.isort]
261
profile = "black"
262

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.