aliceio
/
pyproject.toml
261 строка · 5.0 Кб
1[build-system]
2requires = ["hatchling"]
3build-backend = "hatchling.build"
4
5[project]
6name = "aliceio"
7description = "Asynchronous framework for Alice from Yandex Dialogs"
8readme = "README.md"
9requires-python = ">=3.8"
10license = { file = "LICENSE" }
11authors = [{ name = "K1rL3s - Kirill Lesovoy" }]
12maintainers = [{ name = "K1rL3s - Kirill Lesovoy" }]
13keywords = [
14"alice",
15"yandex",
16"aliceio",
17"bot",
18"api",
19"framework",
20"wrapper",
21"asyncio",
22]
23classifiers = [
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]
40dependencies = [
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
49dynamic = ["version"]
50[tool.hatch.version]
51path = "aliceio/__meta__.py"
52
53[project.optional-dependencies]
54fast = [
55"uvloop>=0.17.0; (sys_platform == 'darwin' or sys_platform == 'linux') and platform_python_implementation != 'PyPy'",
56"aiodns>=3.0.0",
57]
58redis = [
59"redis[hiredis]~=5.0.1",
60]
61proxy = [
62"aiohttp-socks~=0.8.3",
63]
64test = [
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]
77dev = [
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]
86docs = [
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]
94Documentation = "https://aliceio.rtfd.io"
95Repository = "https://github.com/K1rL3s/aliceio"
96
97[tool.hatch.envs.default]
98features = [
99"dev",
100"fast",
101"redis",
102"proxy",
103]
104post-install-commands = [
105"pre-commit install",
106]
107
108[tool.hatch.envs.default.scripts]
109reformat = [
110"black aliceio tests",
111"isort aliceio tests",
112]
113lint = "ruff aliceio"
114
115[tool.hatch.envs.docs]
116features = [
117"fast",
118"redis",
119"proxy",
120"docs",
121]
122
123[tool.hatch.envs.dev]
124python = "3.12"
125features = [
126"dev",
127"fast",
128"redis",
129"proxy",
130"test",
131]
132
133[tool.hatch.envs.test]
134features = [
135"fast",
136"redis",
137"proxy",
138"test",
139]
140
141[tool.hatch.envs.test.scripts]
142cov = [
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]
146cov-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]
150view-cov = "google-chrome-stable reports/py{matrix:python}/coverage/index.html"
151
152
153[[tool.hatch.envs.test.matrix]]
154python = ["38", "39", "310", "311", "312"]
155
156[tool.ruff]
157line-length = 88
158select = [
159"C",
160"C4",
161"E",
162"F",
163"T10",
164"T20",
165"Q",
166"RET",
167]
168ignore = [
169"F401"
170]
171src = ["aliceio", "tests"]
172exclude = [
173".git",
174"build",
175"dist",
176"venv",
177".venv",
178"docs",
179"tests",
180"dev",
181"scripts",
182"*.egg-info",
183]
184target-version = "py38"
185
186[tool.pytest.ini_options]
187asyncio_mode = "auto"
188testpaths = [
189"tests",
190]
191filterwarnings = [
192"error",
193"ignore::pytest.PytestUnraisableExceptionWarning",
194]
195
196[tool.coverage.run]
197branch = false
198parallel = true
199omit = [
200"aliceio/__about__.py",
201]
202
203[tool.coverage.report]
204exclude_lines = [
205"if __name__ == .__main__.:",
206"pragma: no cover",
207"if TYPE_CHECKING:",
208"@abstractmethod",
209"@overload",
210]
211
212[tool.mypy]
213plugins = "pydantic.mypy"
214python_version = "3.8"
215show_error_codes = true
216show_error_context = true
217pretty = true
218ignore_missing_imports = false
219warn_unused_configs = true
220disallow_subclassing_any = true
221disallow_any_generics = true
222disallow_untyped_calls = true
223disallow_untyped_defs = true
224disallow_incomplete_defs = true
225check_untyped_defs = true
226disallow_untyped_decorators = true
227no_implicit_optional = true
228warn_redundant_casts = true
229warn_unused_ignores = true
230warn_return_any = true
231follow_imports_for_stubs = true
232namespace_packages = true
233show_absolute_path = true
234
235[[tool.mypy.overrides]]
236module = [
237"aiofiles",
238"async_lru",
239"uvloop",
240"redis.*",
241]
242ignore_missing_imports = true
243disallow_untyped_defs = true
244
245[tool.black]
246line-length = 88
247target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
248exclude = '''
249(
250\.eggs
251| \.git
252| \.tox
253| build
254| dist
255| venv
256| docs
257)
258'''
259
260[tool.isort]
261profile = "black"
262