-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
107 lines (97 loc) · 2.1 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
[tool.poetry]
name = "cid"
version = "0.1.0"
description = ""
authors = ["Felix Kolwa <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.12,<4.0"
fastapi = "^0.115.0"
sqlalchemy = {extras = ["mypy"], version = "^2.0.30"}
uvicorn = "^0.32.0"
pydantic = "^2.7.3"
psycopg2-binary = "^2.9.9"
httpx = "^0.27.0"
schedule = "^1.2.2"
python-dateutil = "^2.9.0-post.0"
packaging = "^24.1"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest-cov = "^5.0.0"
deptry = "^0.20.0"
mypy = "^1.10.0"
pre-commit = "^4.0.0"
tox = "^4.15.0"
pytest-randomly = "^3.15.0"
pytest-sugar = "^1.0.0"
sqlalchemy-utils = "^0.41.2"
pytest-httpx = "^0.34.0"
types-dateparser = "^1.2.0.20240420"
types-python-dateutil = "^2.9.0.20240316"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
files = ["cid"]
ignore_missing_imports = "True"
disallow_untyped_defs = "True"
disallow_any_unimported = "True"
no_implicit_optional = "True"
check_untyped_defs = "True"
warn_return_any = "True"
warn_unused_ignores = "True"
show_error_codes = "True"
# mypy will complain A LOT about sqlalchemy, so we need an extra plugin.
# See https://docs.sqlalchemy.org/en/20/orm/extensions/mypy.html for details.
plugins = ["sqlalchemy.ext.mypy.plugin"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["--cov=cid", "--cov-report=term-missing", "--cov-report=html"]
[tool.ruff]
target-version = "py37"
line-length = 88
fix = true
select = [
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-simplify
"SIM",
# isort
"I",
# mccabe
"C90",
# pycodestyle
"E", "W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# tryceratops
"TRY",
]
ignore = [
# LineTooLong
"E501",
# DoNotAssignLambda
"E731",
]
[tool.ruff.format]
preview = true
[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]
[tool.poetry.scripts]
populatedb = "cid.bootstrap:populate_db"