Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (148 loc) · 4.19 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (148 loc) · 4.19 KB
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
[tool.poetry]
name = "fastid"
version = "0.1.0"
description = "Effortless authentication solution for your services"
authors = ["Ivan Stasevich <pravitel2015ify@gmail.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = {extras = ["all"], version = "^0.115.14"}
sqlalchemy = { extras = ["asyncio"], version = "^2.0.45" }
gunicorn = "^26.0.0"
gunicorn-h1c = { version = "0.6.5", markers = "sys_platform != 'win32'" }
alembic = "^1.18.0"
asyncpg = "^0.29.0"
passlib = "^1.7.4"
bcrypt = "^4.3.0"
pyjwt = {extras = ["crypto"], version = "^2.10.1"}
sqladmin = "^0.22.0"
humanize = "^4.15.0"
redis = "^5.3.1"
aiogram = "^3.22.0"
opentelemetry-sdk = "^1.31.1"
opentelemetry-instrumentation-fastapi = "^0.52b1"
opentelemetry-instrumentation-logging = "^0.52b1"
opentelemetry-exporter-otlp = "^1.31.1"
prometheus-client = "^0.21.0"
uvicorn-worker = "^0.4.0"
opentelemetry-instrumentation-sqlalchemy = "^0.52b1"
opentelemetry-instrumentation-httpx = "^0.52b1"
fast-depends = "^2.4.12"
uuid-utils = "^0.9.0"
typer = "^0.14.0"
argon2-cffi = "^25.1.0"
sqlalchemy-continuum = "^1.5.2"
[tool.poetry.group.dev.dependencies]
mypy = "^1.19.1"
ruff = "^0.7.4"
pre-commit = "^3.8.0"
pytest = "^9.0.2"
pytest-asyncio = "^1.3.0"
sqlalchemy-utils = "^0.41.2"
faker = "^28.4.1"
codespell = "^2.4.1"
detect-secrets = "^1.5.0"
coverage = {extras = ["html"], version = "^7.13.1"}
smokeshow = "^0.5.0"
aiosqlite = "^0.22.1"
fastlink = "^0.1.6"
pyrefly = "^1.4.0"
[tool.poetry.group.docs.dependencies]
mkdocs-material = "^9.6.14"
mkdocs-minify-plugin = "^0.8.0"
mdx-include = "^1.4.2"
mkdocs-markdownextradata-plugin = "^0.2.6"
markdown-include-variants = "^0.0.4"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py312"
output-format = "concise"
[tool.ruff.lint]
select = [
"ALL"
]
ignore = [
"D", # docstrings
"DOC", # docstrings
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `var`
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"W191", # indentation contains tabs
"RUF012", # mutable class attributes should be annotated with `typing.ClassVar`
"S101", # use of assert detected
"TRY003", # avoid specifying long messages outside the exception class
"PLR6301", # method could be a function, class method, or static method
# Handled by formatter later
"ISC001", # single line implicit string concatenation
"COM812", # missing trailing comma
"E501", # line too long
]
[tool.ruff.lint.per-file-ignores]
"migrations/*" = ["INP001"] # Implicit namespace packages are not allowed
"tests/*" = ["ARG001"] # Unused function argument
[tool.mypy]
strict = true
pretty = true
python_version = "3.12"
ignore_missing_imports = true
install_types = true
non_interactive = true
plugins = ["pydantic.mypy"]
# from https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
show_error_codes = true
warn_unused_ignores = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
disallow_any_unimported = false
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
[tool.coverage.run]
parallel = true
branch = true
concurrency = ["greenlet", "thread"]
source = ["fastid"]
context = '${CONTEXT}'
omit = ["**/__init__.py"]
[tool.coverage.report]
show_missing = true
skip_empty = true
exclude_also = [
"if __name__ == .__main__.:",
# "self.logger",
"def __repr__",
"lambda: None",
"from .*",
"import .*",
'@(abc\.)?abstractmethod',
"raise NotImplementedError",
'raise AssertionError',
# 'logger\..*',
"pass",
'\.\.\.',
]
omit = [
'*/__about__.py',
'*/__main__.py',
'*/__init__.py',
'*/dependencies.py',
'*/schemas.py',
"fastid/plugins/*",
"fastid/frontend/*",
"fastid/admin/*",
"fastid/core/*",
"fastid/api/*",
]
[tool.codespell]
skip = "./venv*,./docs,./htmlcov,./poetry.lock"
ignore-words = ".codespell-whitelist.txt"