-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpyproject.toml
139 lines (127 loc) · 3.65 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
[tool.coverage.run]
source = ["merino"]
branch = true
relative_files = true
omit = [
# Data file only
"merino/jobs/utils/domain_category_mapping.py"
]
[tool.coverage.report]
show_missing = true
[tool.ruff]
line-length = 99
exclude = ["build", "dist", "__pycache__", ".git"]
lint.select = ["D", "E4", "E7", "E9", "F"]
# Error Code Ref: https://www.pydocstyle.org/en/stable/error_codes.html
# D212 Multi-line docstring summary should start at the first line
lint.extend-select = ["D212"]
lint.ignore = [
# D105 Docstrings for magic methods
"D105",
# D107 Docstrings for __init__
"D107",
# D203 as it conflicts with D211 https://github.com/PyCQA/pydocstyle/issues/141
"D203",
# D205 1 blank line required between summary line and description, awkward spacing
"D205",
# D400 First line should end with a period, doesn't work when sentence spans 2 lines
"D400"
]
lint.extend-ignore = ["E203"]
lint.per-file-ignores = {"__init__.py" = ["F401"]}
lint.pydocstyle = { convention = "pep257" }
[tool.bandit]
# skips asserts
# B101: https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html#
# B104: https://bandit.readthedocs.io/en/latest/plugins/b104_hardcoded_bind_all_interfaces.html
# B104: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b311-random
skips = ["B101", "B104", "B311"]
exclude_dirs = [
# Data file only
"merino/jobs/utils/domain_category_mapping.py"
]
[tool.mypy]
python_version = "3.12"
plugins = ['pydantic.mypy']
disallow_untyped_calls = true
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_error_codes = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_ignores = true
warn_unreachable = true
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v -r s --cov=merino"
[tool.poetry]
name = "merino-py"
version = "0.1.0"
description = "Service for Firefox Suggest at Mozilla"
authors = ["Mozilla"]
license = "Mozilla Public License Version 2.0"
packages = [
{ include = "merino" }
]
[tool.poetry.scripts]
merino-jobs = "merino.jobs.cli:cli"
[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.115.2"
uvicorn = { extras = ["standard"], version = "^0.24.0" }
dockerflow = "^2022.7.0"
asgi-correlation-id = "^4.3.4"
dynaconf = "^3.2.4"
httpx = "^0.23.0"
sentry-sdk = {extras = ["fastapi"], version = "^2.13.0"}
kinto-http = "^11.0.0"
aiodogstatsd = "^0.16.0"
ua-parser = "^0.16.1"
geoip2 = "^4.6.0"
rich = "^12.5.1"
wrapt = "^1.14.1"
elasticsearch = {extras = ["async"], version = "^8.5.0"}
google-cloud-storage = "^2.16.0"
google-cloud-bigquery = "^3.9.0"
Pillow = "^10.2.0"
redis = "^4.5.4"
types-python-dateutil = "^2.8.19.13"
pydantic = "^2.1.0"
scipy = "^1.14.1"
orjson = "^3.10.7"
tenacity = "^9.0.0"
[tool.poetry.group.jobs.dependencies]
# Jobs specific dependecies required on top of some of the main dependencies above
robobro = "^0.5.3"
typer = "^0.11.0"
[tool.poetry.group.load.dependencies]
# Load test specific dependecies required on top of some of the main dependencies above
faker = "^20.0.0"
numpy = "^1.26.2"
locust = "^2.20.0"
[tool.poetry.group.dev.dependencies]
mypy = "^1.5"
pre-commit = "^2.20.0"
bandit = {extras = ["toml"], version = "^1.7.5"}
types-PyYAML = "^6.0.11"
types-requests = "^2.28.10"
types-geoip2 = "^3.0.0"
scalene = "^1.5.13"
pytest = "^7.2.0"
pytest-asyncio = "^0.20.3"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
freezegun = "^1.2.2"
requests-mock = "^1.10.0"
requests-toolbelt = "^1.0.0"
ruff = "^0.4.10"
types-redis = "^4.5.1.1"
testcontainers = "^4.0.1"
types-pillow = "^10.2.0.20240520"
coverage = "^7.5.4"
[build-system]
requires = ["poetry-core>=1.8.1"]
build-backend = "poetry.core.masonry.api"