-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpyproject.toml
225 lines (202 loc) · 5.04 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "FastAPI-JSONAPI"
dynamic = ["version"]
description = "FastAPI extension to create REST web api according to JSON:API 1.0 specification with FastAPI, Pydantic and data provider of your choice (SQLAlchemy, Tortoise ORM)"
readme = "README.md"
license = "MIT"
authors = [
{ name = "Aleksey Nekrasov", email = "[email protected]" },
{ name = "Suren Khorenyan", email = "[email protected]" },
{ name = "German Bernadskiy", email = "[email protected]" },
]
keywords = [
"fastapi",
"jsonapi",
"json:api",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Utilities",
]
dependencies = [
"fastapi>=0.79.0",
"pydantic>=1.9.1",
"simplejson>=3.17.6",
"uvicorn>=0.18.2",
]
[project.optional-dependencies]
all = [
"pytest",
"sphinx",
"SQLAlchemy[asyncio]>=1.4.39",
"tortoise-orm>=0.19.2",
]
docs = [
"sphinx",
]
sqlalchemy = [
"SQLAlchemy[asyncio]>=1.4.39",
]
tests = [
"pytest",
]
tortoise-orm = [
"tortoise-orm>=0.19.2",
]
[project.urls]
Documentation = "https://fastapi-jsonapi.readthedocs.io/"
Source = "https://github.com/mts-ai/FastAPI-JSONAPI"
[tool.hatch.version]
path = "fastapi_jsonapi/VERSION"
pattern = "(?P<version>[^']+)"
[tool.hatch.build.targets.sdist]
include = [
"/fastapi_jsonapi",
"/examples",
]
[tool.hatch.build.targets.wheel]
packages = [
"fastapi_jsonapi"
]
[tool.poetry]
package-mode = false
[tool.poetry.dependencies]
python = "^3.9"
fastapi = ">=0.79.0"
pydantic = ">=1.9.1"
simplejson = ">=3.17.6"
uvicorn = ">=0.18.2"
sqlalchemy = { version = ">=1.4.39", optional = true, extras = ["asyncio"] }
tortoise-orm = { version = ">=0.19.2", optional = true }
[tool.poetry.group.tests.dependencies]
pytest = "^7.3.1"
faker = "^18.9.0"
httpx = "^0.24.1"
pytest-asyncio = "^0.21.0"
coverage = "^7.2.6"
pytest-cov = "^4.1.0"
aiosqlite = "0.17.0"
asyncpg = "0.28.0"
[tool.poetry.group.lint.dependencies]
black = "^23.3.0"
ruff = "^0.1.8"
mypy = "^1.4.1"
sqlalchemy-stubs = "^0.4"
pre-commit = "^3.3.3"
[tool.poetry.group.docs.dependencies]
sphinx = "^7.0.1"
[tool.poetry.group.dev.dependencies]
hatch = "^1.7.0"
[tool.poetry.extras]
sqla = ["sqlalchemy"]
tortoise = ["tortoise-orm"]
databases = ["sqlalchemy", "tortoise-orm"]
[tool.black]
line-length = 119
target-version = ["py38"]
[tool.ruff]
line-length = 119
target-version = "py39"
select = [
"E",
"W",
"F",
"I",
"D",
"A",
"C4",
"COM",
"DTZ",
"T10",
"EM",
"ISC",
"ICN",
"G",
"T20",
"PT",
"SIM",
"TID",
"ARG",
"PTH",
# "ERA",
"PL",
"PLE",
"PLR",
"PLW",
"RUF",
"ASYNC",
# "UP",
# "ANN",
]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"docs/*",
"examples/api_for_tortoise_orm/*",
]
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
extend-ignore = [
"D401",
"D403",
"D400",
"D415",
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in `__init__`
"D200", # One-line docstring should fit on one line
"D203", # 1 blank line required before class docstring
"D210", # No whitespaces allowed surrounding docstring text
"D212", # Multi-line docstring summary should start at the first line
"D301", # Use r""" if any backslashes in a docstring
"D404", # First word of the docstring should not be "This"
"PLR0913", # Too many arguments to function call
"A003", # Class attribute `type` is shadowing a Python builtin
"ARG001", # Unused function argument: `{name}`
"ARG002", # Unused method argument: `{name}`
"ARG003", # Unused class method argument: `{name}`
"RUF001", # String contains ambiguous unicode character {confusable} (did you mean {representant}?)
"RUF002", # Docstring contains ambiguous unicode character {confusable} (did you mean {representant}?)
"RUF003", # Comment contains ambiguous unicode character {confusable} (did you mean {representant}?)
"PT006", # pytest parametrize tuple args
]
[tool.ruff.per-file-ignores]
"examples/api_for_sqlalchemy/*" = [
"E402",
"D105",
]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10