-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
153 lines (139 loc) · 3.46 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
[build-system]
requires = ["poetry>=2.0"]
build-backend = "poetry.masonry.api"
[project]
name = "ctms"
version = "1.0"
description = "Contact Management System API"
readme = "README.md"
authors = [
{ name = "CTMS Reviewers" },
]
requires-python = ">=3.12,<4"
package-mode = false
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"alembic>=1.14",
"argon2-cffi>=23.1",
"colorama>=0.4.6",
"dockerflow[fastapi]>=2024.4.2",
"fastapi>=0.115.6",
"google-auth>=2.37",
"lxml>=5.3",
"prometheus-client==0.21.1",
"psycopg2>=2.9.10",
"pydantic-settings>=2.7",
"pydantic[email]>=2.10.4",
"pyjwt>=2.10.1",
"python-dateutil>=2.9",
"python-multipart>=0.0.20",
"requests>=2.32.3",
"sentry-sdk[fastapi]>=2.19.2",
"sqlalchemy>=2.0.36",
"starlette>=0.41.3",
"uvicorn[standard]>=0.34",
]
# TODO: Move to PEP 735 dependency-groups when supported:
# https://github.com/python-poetry/poetry/issues/9751
[tool.poetry.group.dev.dependencies]
backoff = ">=2.2.1"
bandit = ">=1.8.0"
coverage = {extras = ["toml"], version = ">=7.6.10"}
detect-secrets = ">=1.5.0"
factory-boy = ">=3.3.1"
httpx = ">=0.28.1"
mypy = "^1.14.1"
pre-commit = ">=4.0.1"
pytest = ">=8.3.4"
pytest-factoryboy = ">=2.7.0"
ruff = ">=0.9.3"
SQLAlchemy-Utils = ">=0.41.2"
types-python-dateutil = ">=2.9.0"
types-requests = ">=2.32.0"
[tool.pytest.ini_options]
testpaths = [ "tests/unit" ]
markers = [
"disable_autouse: disable fixtures configured with `autouse=True`",
]
[tool.ruff]
target-version = "py312"
line-length = 150
extend-exclude = ["migrations"]
[tool.ruff.lint]
select = [
"A", # flake8-builtin errors
"B", # bugbear errors
"C4", # flake8-comprehensions errors
"E", # pycodestyle errors
"F", # pyflakes errors
"FAST", # FastAPI
"I", # import sorting
"PL", # pylint errors
"Q", # flake8-quotes errors
"UP", # py-upgrade
"W", # pycodestyle warnings
]
ignore = [
"A005", # stdlib module shadowing - platform and email
"B008", # function call in default arguments - used for `Depends` in argument defaults.
"PLR2004", # magic value comparison
"PLR0913", # too many arguments
]
[tool.coverage.run]
omit = [
'*/.local/*',
'/usr/*',
'*/.venv/*',
'*/.tox/*',
'*/virtualenvs/*',
]
[tool.coverage.report]
exclude_lines = [
"# noqa",
"raise NotImplementedError",
"pragma: no cover",
"def __repr__",
"if .debug:",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"logger.",
"from",
"import",
]
[tool.mypy]
# Sync Python version with Dockerfile
python_version = "3.12"
# Look for errors in this file
warn_unused_configs = true
plugins = [ "pydantic.mypy" ]
# TODO: Get stricter for these options
# None is compatible with all types (pre-mypy 0.6 behaviour)
strict_optional = false
# Suppress all missing import errors for all libraries
ignore_missing_imports = true
# Warn when returning Any from function with non-Any return
warn_return_any = true
[[tool.mypy.overrides]]
module = "ctms.auth"
strict_optional = true
ignore_missing_imports = false
[[tool.mypy.overrides]]
module = "ctms.crud"
strict_optional = true
ignore_missing_imports = false
[[tool.mypy.overrides]]
module = "ctms.metrics"
strict_optional = true
ignore_missing_imports = false
disallow_untyped_defs = true
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "ctms.log"
strict_optional = true
ignore_missing_imports = false
disallow_untyped_defs = true
check_untyped_defs = true