-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
145 lines (125 loc) · 3.48 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
[tool.poetry]
name = "va-enp-api"
version = "0.0.1"
description = ""
authors = ["VA Enterprise Notification Platform - VA Notify"]
license = "MIT"
readme = "README.md"
package-mode = false
# https://peps.python.org/pep-0518/#tool-table
[tool.static_tests]
poetry_version = "1.8.4"
[tool.poetry.dependencies]
python = "^3.13"
aiobotocore = "*"
# Botocore later than 1.36.20 causes KeyError: 'botocore_supported_protocols' in
# tests/app/providers/test_provider_aws.py
# TestProviderAWS::test_send_push_notification_botocore_exceptions_not_retriable
botocore = ">=1.36.0,<1.36.20"
fastapi = {extras = ["standard"], version = "*"}
pyjwt = "*"
gunicorn = "*"
loguru = "*"
phonenumbers = "*"
psycopg = {extras = ["binary"], version = "*"}
pydantic = "*"
pydantic_extra_types = "*"
sqlalchemy = {extras = ["asyncio"], version = "*"}
tenacity = "*"
uvicorn-worker = "*"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest-cov = "*"
pytest = "*"
pytest-asyncio = "*"
pytest-mock = "*"
[tool.poetry.group.static_tools]
optional = true
[tool.poetry.group.static_tools.dependencies]
flake8-docstrings-complete = "*" # Needed to ensure Args are in the docstring
mypy = "*"
pre-commit = "*"
ruff = "*"
types-aiobotocore = {extras = ["essential"], version = "*"}
[tool.poetry.group.mkdocs]
optional = true
[tool.poetry.group.mkdocs.dependencies]
mkdocs = "*"
mkdocstrings = {extras = ["python"], version = "*"}
mkdocs-material = "*"
mkdocs-gen-files = "*"
[tool.bandit]
skips = ["B101"] # https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
[tool.coverage.run]
omit = [
"app/logging/*",
"app/main.py",
"tests/app/test_main.py"
]
[tool.coverage.report]
fail_under = 100
precision = 2
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"migrations",
]
line-length = 120
indent-width = 4
target-version = "py313"
[tool.ruff.format]
docstring-code-format = true # https://docs.astral.sh/ruff/settings/#format-docstring-code-format
# docstring-code-line-length = "dynamic" # https://docs.astral.sh/ruff/settings/#format-docstring-code-line-length
indent-style = "space"
line-ending = "auto"
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint]
# Replace pydocstrings with pydoclint when it is ready: https://github.com/astral-sh/ruff/issues/12434
# D417 will not raise an error if there is no arg/param section: https://github.com/astral-sh/ruff/issues/2310
select = ["ANN", "ASYNC", "C901", "DOC", "D", "E4", "E7", "E9", "F", "G", "FAST", "I", "PLE", "PT", "RUF", "TID252", "W"]
ignore = ["D203", "D213"]
preview = true
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 5
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["D104"]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
addopts = "--cov=app --cov=tests --cov-report=term-missing -W error"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"