Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (141 loc) · 3.28 KB
/
Copy pathpyproject.toml
File metadata and controls
160 lines (141 loc) · 3.28 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
[project]
name = "fastapi-enterprise-template"
version = "0.1.0"
description = "cookiecutter enterprise template for fastapi"
authors = [{ name = "jeffry", email = "182467653@qq.com" }]
dependencies = [
"fastapi>=0.115.11",
"alembic>=1.14.1",
"sqlalchemy>=2.0.38",
"pydantic-settings>=2.8.1",
"uvicorn>=0.34.0",
"pyjwt>=2.10.1",
"redis>=5.0.6",
"sentry_sdk>=1.39.2",
"httpx>=0.28.1",
"pydantic_extra_types>=2.4.1",
"phonenumbers>=8.13.27",
"asyncpg>=0.30.0",
"sqladmin>=0.20.1",
"cryptography>=42.0.7",
"bcrypt>=4.3.0",
"gunicorn>=22.0.0",
"aio-pika>=9.4.1",
"greenlet>=3.1.1",
"uvloop>=0.21.0",
"httptools>=0.6.4",
]
readme = "README.md"
requires-python = ">= 3.12"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.3.5",
"pre-commit>=4.1.0",
"ruff>=0.9.9",
"pytest-cov>=6.0.0",
"pytest-asyncio>=0.25.3",
"black>=25.1.0",
"mypy>=1.15.0",
"types-redis>=4.6.0.20240425",
"polyfactory>=2.19.0",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D",
"G002",
"DTZ003",
"ANN401",
"A005",
"EM101",
"PD901",
"COM812",
"ISC001",
"FBT",
"A003",
"PLR0913",
"G004",
"E501",
"TRY003",
]
fixable = ["ALL"]
[tool.ruff.lint.extend-per-file-ignores]
"env.py" = ["INP001", "I001", "ERA001"]
"tests/*.py" = ["S101", "ANN201"]
"*exceptions.py" = ["ARG001"]
"models.py" = ["RUF012"]
"api.py" = ["A002", "B008"]
"deps.py" = ["B008"]
"src/internal/api.py" = ["ARG001"]
"src/auth/schemas.py" = ["N815"] # frontend menu
"alembic/*.py" = ["INP001", "UP007"]
"__init__.py" = ["F403"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.Query",
"fastapi.params_functions.Form",
"fastapi.File",
"fastapi.Path",
"fastapi.params.Depends",
]
[tool.black]
line-length = 120
preview = true
[tool.pytest.ini_options]
addopts = "--cov-report term --cov-config=.coveragerc -W ignore:DeprecationWarning --cov=src -v"
xfail_strict = true
asyncio_mode = "auto"
markers = ["pytest.mark.anyio"]
testpaths = ["tests"]
[tool.coverage.report]
skip_empty = true
skip_covered = true
precision = 2
omit = ["*/__init__.py", "*/consts.py"]
exclude_lines = [
"pragma: no cover",
"raise NotImplentmentError",
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING",
"@overload",
"@typing.overload",
"assert_never",
"typing.assert_never",
]
[tool.coverage.run]
concurrency = ["thread", "greenlet"]
[tool.mypy]
exclude = "^tools/.*"
plugins = ["pydantic.mypy"]
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_return_any = true
strict = true
disallow_untyped_decorators = true
disallow_any_generics = false
implicit_reexport = false
show_error_codes = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pyright]
include = ["src", "tests", "examples"]
reportIncompatibleVariableOverride = false
pythonVersion = "3.12"