-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (114 loc) · 2.38 KB
/
pyproject.toml
File metadata and controls
124 lines (114 loc) · 2.38 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
[tool.poetry]
name = "yet-another-fastapi-RW-example"
version = "0.0.1"
description = "Another FastAPI realworld example project"
authors = ["whc <whccchi@gmail.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.110.0"
uvicorn = "^0.28.0"
sqlmodel = "^0.0.16"
alembic = "^1.13.1"
loguru = "^0.7.0"
psycopg2-binary = "^2.9"
pydantic = "^2.6.3"
asyncpg = "^0.29.0"
slack-sdk = "^3.27.1"
boto3 = "^1.34.59"
typer = {version = "^0.9.0", extras = ["all"]}
inflect = "^7.0.0"
pydantic-settings = "^2.2.1"
[tool.poetry.group.dev.dependencies]
yapf = "^0.40.2"
toml = "^0.10.2"
pytest = "^8.1.1"
pytest-env = "^1.1.3"
httpx = "^0.27.0"
mypy = "^1.9.0"
pytest-cov = "^4.1.0"
pytest-xdist = "^3.5.0"
ruff = "^0.3.2"
pytest-asyncio = "^0.23.5.post1"
pre-commit = "^3.6.2"
bandit = {version = "^1.7.8", extras = ["baseline"]}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.yapf]
column_limit = 88
based_on_style = "google"
split_before_logical_operator = true
split_before_arithmetic_operator = true # flake8 W504
[tool.ruff]
line-length = 88
lint.extend-select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
lint.extend-ignore = [
"E501",
"B008",
"E402",
"E226",
"B904",
"B030",
"B006"
]
extend-exclude = [
".venv",
".git",
"__pycache__",
"__init__.py"
]
[tool.ruff.isort]
force-single-line = false
force-sort-within-sections = true
single-line-exclusions = ["typing"]
order-by-type = false
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.flake8-quotes]
inline-quotes = "single"
# pytest setup
[tool.pytest.ini_options]
addopts = """
-ra
-q
--strict-markers
--asyncio-mode=auto
"""
testpaths = [
"tests"
]
env = [
"APP_NAME=test",
"APP_ENV=test",
"APP_URL=http://localhost",
"LOG_LEVEL=debug",
"DB_USER=root",
"DB_PASSWORD=",
"DB_HOST=pgsql",
"DB_PORT=5432",
"DB_NAME=postgres_test"
]
log_format = "%(asctime)s (%(filename)-16s:%(lineno)-3s) %(levelname)-8s %(message)s"
log_date_format = "%Y-%M-%D %H:%M:%S"
[tool.bandit]
exclude_dirs = [
".venv",
".git",
"__pycache__",
"app/bin",
"database",
"tests",
"storage",
".docker",
".vscode",
]
[tool.poetry.scripts]
make-template = "app.bin.make_boilerplate.main:app"