-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
190 lines (162 loc) · 4.76 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
[project]
name = "hiku"
dynamic = ["version"]
description = "Library to implement Graph APIs"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { text = "BSD-3-Clause" }
authors = [
{ name = "Vladimir Magamedov", email = "[email protected]" },
{ name = "Maksym Kindritskyi", email = "[email protected]" },
]
dependencies = []
requires-python = ">=3.8"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'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 :: Only',
'Topic :: Software Development :: Libraries :: Python Modules',
]
[project.urls]
Documentation = "https://hiku.readthedocs.io/en/latest/"
Repository = "https://github.com/evo-company/hiku"
Homepage = "https://github.com/evo-company/hiku"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
[tool.pdm.version]
source = "file"
path = "hiku/__init__.py"
[tool.pdm.build]
includes = ["hiku", "hiku/pytyped"]
excludes = ["tests", "**/.*.*"]
[tool.pdm.dev-dependencies]
test = [
"astor>=0.8.1",
"pytest>=7.4.2",
"pytest-cov>=4.1.0",
"pytest-asyncio>=0.21.1",
"faker>=18.13.0",
"pytest-benchmark[histogram]>=4.0.0",
"asyncpg>=0.28.0", # for tests_pg
"greenlet>=3.0.0", # for tests_pg
]
dev = [
"graphql-core>=3.2.3", # for graphql support
"sqlalchemy<2",
"aiopg>=1.4.0", # for async postgresql support
"prometheus-client>=0.17.1", # for prometheus metrics
"sentry-sdk>=1.31.0", # for sentry tracing
"typing-extensions>=4.7.1",
"mypy>=1.4.1",
"black>=23.3.0",
"flake8>=5.0.4",
]
docs = [
"sphinx>=7.1.2",
"furo>=2024.8.6",
"sphinx-inline-tabs>=2023.4.21",
"sphinx-autobuild>=2021.3.14",
]
examples = ["flask>=2.2.5", "aiohttp>=3.8.6"]
[tool.pdm.resolution.overrides]
importlib-metadata = ">=4.3"
[tool.pdm.scripts]
bench = "python -m pytest --benchmark-enable {args:tests}"
test = "python -m pytest {args:tests}"
test-pg = "python -m pytest {args:tests_pg}"
test-pg-local = "python -m pytest --pg-host=localhost {args:tests_pg}"
test-all = { composite = ["test", "test-pg"] }
fmt = "python -m black hiku examples"
mypy = "python -m mypy"
flake = "python -m flake8"
docs = "sphinx-build -b html docs docs/build"
docs-dev = "sphinx-autobuild -b html docs docs/build"
check = { composite = ["fmt", "test", "mypy", "flake"] }
example = "python examples/{args:graphql_flask}.py"
[tool.pytest.ini_options]
addopts = "--tb=native --benchmark-disable"
testpaths = ["tests", "tests_pg"]
filterwarnings = [
"once::DeprecationWarning",
"once::PendingDeprecationWarning",
"ignore::DeprecationWarning:graphql.*",
"ignore::DeprecationWarning:promise.*",
"ignore::DeprecationWarning:google.*",
"ignore::DeprecationWarning:sqlalchemy.*",
]
[tool.coverage.run]
branch = true
source = ["hiku"]
[tool.mypy]
files = ["hiku"]
python_version = 3.8
check_untyped_defs = true
#disallow_any_generics = true
#disallow_untyped_calls = true
disallow_untyped_defs = true
follow_imports = "silent"
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
show_error_codes = true
ignore_errors = false
exclude = ["tests", "tests_pg"]
[[tool.mypy.overrides]]
module = "hiku.telemetry.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.expr.refs.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.expr.checker.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.expr.compiler.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.sources.sqlalchemy.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.sources.aiopg.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "hiku.builder.*"
disallow_untyped_defs = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "google.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "graphql.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sqlalchemy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "prometheus_client.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sentry_sdk.*"
ignore_missing_imports = true
[tool.black]
line-length = 80
target-version = ['py38']
[tool.isort]
py_version = "38"
profile = "black"
line_length = 80