-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (154 loc) · 5.91 KB
/
Copy pathpyproject.toml
File metadata and controls
170 lines (154 loc) · 5.91 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[tool.poetry]
name = "yellowbox"
version = "0.11.2"
description = ""
authors = ["biocatch ltd"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/biocatchltd/yellowbox"
[tool.poetry.dependencies]
python = "^3.10"
docker = ">=4.2.0"
yaspin = ">=1.0.0"
requests = "*"
redis = { version = ">=3.3.0", optional = true }
async-timeout = { version = ">=4.0.3", optional = true, python = "<3.11" }
pika = { version = "*", optional = true }
# python 3.11 and lower use kafka-python, 3.12 and higher use confluent-kafka
kafka-python = { version = "*", optional = true, python="<3.12" }
confluent-kafka = { version = "*", optional = true, python=">=3.12" }
aerospike = { version = ">=10.0.1", optional = true }
# note that any version between 12.7.0 and 12.11.0 will not work
azure-storage-blob = { version = ">=12.0.0", optional = true }
cffi = { version = ">=1.14.0", optional = true }
sqlalchemy = { version = ">=2.0.0", optional = true }
psycopg = { version = "^3.2.12", optional = true, extras = ["binary"] }
simple_websocket_server = { version = "*", optional = true }
websockets = { version = "*", optional = true }
hvac = { version = "*", optional = true }
Deprecated = ">=1.2.13"
SQLAlchemy-Utils = { version = ">=0.38.2", optional = true }
# these dependcies are split due to 3.8 and 3.12 incompatibilities
starlette = [
{ version = ">=0.30", optional = true, python = ">=3.12" },
{ version = ">=0.9", optional = true, python = ">=3.8" }
]
uvicorn = [
{ version = ">=0.24", optional = true, python = ">=3.12" },
{ version = ">=0.13", optional = true, python = ">=3.8" }
]
pyodbc = [
{ version = ">=5.0.0", optional = true, python = ">=3.12" },
{ version = ">=4.0.32", optional = true, python = ">=3.8" }
]
[tool.poetry.group.dev.dependencies]
pytest = "^7.0.0"
pytest-cov = "^4.1"
requests = "^2"
websocket_client = "*"
mypy = {version=">=1"}
types-requests = "^2.25.0"
types-redis = "^3.5.4"
pytest-xdist = "^2.1.0"
sphinx = {version="^6.1.3", python=">=3.12"}
furo = {version="*", python=">=3.12"}
pytest-asyncio = "^0.18.2"
coverage = "^6.3.2"
types-Deprecated = "^1.2.7"
google-cloud-storage = "^2.5.0"
gcloud-aio-storage = "^8.0.0"
setuptools = "^67.3.3"
ruff = {version=">=0.1"}
typing-extensions = "^4.6.3"
confluent-kafka = "^2.3.0"
# these dependencies are split due to 3.8 and 3.12 incompatibilities
httpx = [
{version=">=0.25.1", python=">=3.12"},
{version=">=0.20", python=">=3.8"}
]
aiohttp = [
{version=">=3.9", python=">=3.12"},
{version="*", python=">=3.8"}
]
frozenlist = [
{version=">1.4", python=">=3.12"},
{version="*", python=">=3.8"},
]
[tool.poetry.extras]
azure = ["azure-storage-blob", "cffi"]
kafka = ["kafka-python", "confluent-kafka"]
postgresql = ["sqlalchemy", "psycopg", "SQLAlchemy-Utils"]
mssql = ['sqlalchemy', "SQLAlchemy-Utils"]
rabbit = ["pika"]
redis = ["redis", "async-timeout"]
vault = ["hvac"]
webserver = ["starlette", "uvicorn", "websockets"]
websocket = ["simple_websocket_server", "websocket_client"]
gcs = [] # empty for now, but we want to maintain forwards compatiblity in case we even want to add extras here
aerospike = ["aerospike"]
dev = ["redis", "async-timeout", "pika", "kafka-python", "azure-storage-blob", "cffi", "sqlalchemy", "psycopg",
"simple_websocket_server", "websocket_client", "starlette", "python-igraph", "uvicorn", "websockets", "hvac",
'pyodbc', 'SQLAlchemy-Utils', "aerospike"]
[build-system]
requires = ["poetry>=1.0.0"]
build-backend = "poetry.masonry.api"
[tool.poetry.plugins.pytest11]
yellowbox = "yellowbox._pytest"
[tool.ruff]
line-length = 120
output-format = "full"
target-version = "py38"
[tool.ruff.lint]
# https://beta.ruff.rs/docs/rules/
select = ["I", "E", "W", "F", "N", "BLE", "COM", "C4", "ISC", "ICN", "G", "PIE", "T20", "PYI", "Q", "SLF", "SIM",
"ERA", "PGH", "PLC", "PLE", "PLR", "PLW", "RUF", "PT", "B"]
# should be included later: UP, ANN, RET?, ARG, TRY, S
ignore = [
"ISC001", # irnored by linter because of formatter
"COM812", # trailing comma, handled by black
"PLR2004", # Magic value used in comparison
"PLR0913", # Too many arguments to function call
"PLR0912", # too many branches
"PLR0911", # Too many return statements
"PLR0915", # too many statements
"SIM108", # Use ternary operator instead of `if`-`else`-block
"SIM105", # Use `contextlib.suppress(...)` instead of try-except-pass
"S101", # assert detected
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"SIM118", # Use `key in {}` instead of `key in {}.keys()`
"SIM112", # Use capitalized environment variable
"S311", # use of non-cryptographic random
"T201", # print found
"PT013", # Found incorrect import of pytest, use simple `import pytest` instead
"B905", # `zip()` without an explicit `strict=` parameter
"SIM115", # Use a context manager for file operations, TODO: figure out if the warnings are justified
]
exclude = [
"yellowbox/extras/websocket.py",
"yellowbox/extras/http_server.py",
"tests/extras/test_websocket.py",
"tests/extras/test_http_server.py",
"docs/conf.py",
]
[tool.ruff.lint.isort]
combine-as-imports=true
[tool.ruff.lint.flake8-pytest-style]
raises-require-match-for = []
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"S105", # Possible hardcoded password
"S113", # Probable use of requests call without timeout
"PIE804", # Unnecessary `dict` kwargs
"PT004", # Fixture does not return anything, add leading underscore
"BLE001", # BLE001 Do not catch blind exception: `Exception`
"F405", # name may be undefined, or defined from star imports
"F403", # star import used; unable to detect undefined names
"T201", # `print` found
"SLF001", # Private member accessed
"PLC1901", # simplify str == ""
"B018", # useless expression
]