forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
395 lines (371 loc) · 13 KB
/
pyproject.toml
File metadata and controls
395 lines (371 loc) · 13 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
[tool.poetry]
name = "testcontainers"
version = "4.14.0" # auto-incremented by release-please
description = "Python library for throwaway instances of anything that can run in a Docker container"
authors = ["Sergey Pirogov <automationremarks@gmail.com>"]
maintainers = [
"Balint Bartha <totallyzen@users.noreply.github.com>",
"David Ankin <daveankin@gmail.com>",
"Vemund Santi <vemund@santi.no>",
]
readme = "README.md"
keywords = ["testing", "logging", "docker", "test automation"]
license = "Apache-2.0"
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Information Technology",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
# testcontainers-core is a proper package dependency - only modules needed here
packages = [
{ include = "testcontainers", from = "core" },
{ include = "testcontainers", from = "modules/arangodb" },
{ include = "testcontainers", from = "modules/aws" },
{ include = "testcontainers", from = "modules/azurite" },
{ include = "testcontainers", from = "modules/cassandra" },
{ include = "testcontainers", from = "modules/chroma" },
{ include = "testcontainers", from = "modules/clickhouse" },
{ include = "testcontainers", from = "modules/cockroachdb" },
{ include = "testcontainers", from = "modules/cosmosdb" },
{ include = "testcontainers", from = "modules/db2" },
{ include = "testcontainers", from = "modules/elasticsearch" },
{ include = "testcontainers", from = "modules/generic" },
{ include = "testcontainers", from = "modules/test_module_import" },
{ include = "testcontainers", from = "modules/google" },
{ include = "testcontainers", from = "modules/influxdb" },
{ include = "testcontainers", from = "modules/k3s" },
{ include = "testcontainers", from = "modules/kafka" },
{ include = "testcontainers", from = "modules/keycloak" },
{ include = "testcontainers", from = "modules/localstack" },
{ include = "testcontainers", from = "modules/mailpit" },
{ include = "testcontainers", from = "modules/memcached" },
{ include = "testcontainers", from = "modules/minio" },
{ include = "testcontainers", from = "modules/milvus" },
{ include = "testcontainers", from = "modules/mongodb" },
{ include = "testcontainers", from = "modules/mqtt" },
{ include = "testcontainers", from = "modules/mssql" },
{ include = "testcontainers", from = "modules/mysql" },
{ include = "testcontainers", from = "modules/nats" },
{ include = "testcontainers", from = "modules/neo4j" },
{ include = "testcontainers", from = "modules/nginx" },
{ include = "testcontainers", from = "modules/ollama" },
{ include = "testcontainers", from = "modules/openfga" },
{ include = "testcontainers", from = "modules/opensearch" },
{ include = "testcontainers", from = "modules/oracle-free" },
{ include = "testcontainers", from = "modules/postgres" },
{ include = "testcontainers", from = "modules/qdrant" },
{ include = "testcontainers", from = "modules/rabbitmq" },
{ include = "testcontainers", from = "modules/redis" },
{ include = "testcontainers", from = "modules/registry" },
{ include = "testcontainers", from = "modules/sftp" },
{ include = "testcontainers", from = "modules/selenium" },
{ include = "testcontainers", from = "modules/scylla" },
{ include = "testcontainers", from = "modules/trino" },
{ include = "testcontainers", from = "modules/vault" },
{ include = "testcontainers", from = "modules/weaviate" },
]
[tool.poetry.urls]
"GitHub" = "https://github.com/testcontainers/testcontainers-python"
"Issue Tracker" = "https://github.com/testcontainers/testcontainers-python/issues"
[tool.poetry.dependencies]
python = ">=3.10"
docker = "*" # ">=4.0"
urllib3 = "*" # "<2.0"
wrapt = "*" # "^1.16.0"
typing-extensions = "*"
python-dotenv = "*"
# community modules
python-arango = { version = "^8", optional = true }
azure-storage-blob = { version = "^12", optional = true }
cassandra-driver = { version = "^3", optional = true }
#clickhouse-driver = { version = "*", optional = true }
google-cloud-pubsub = { version = "^2", optional = true }
google-cloud-datastore = { version = "^2", optional = true }
influxdb = { version = "^5", optional = true }
influxdb-client = { version = "^1", optional = true }
kubernetes = { version = "*", optional = true }
pyyaml = { version = ">=6.0.3", optional = true }
python-keycloak = { version = "^6", optional = true, markers = "python_version < '4.0'" }
boto3 = { version = "^1", optional = true }
minio = { version = "^7", optional = true }
nats-py = { version = "^2", optional = true }
pymongo = { version = "^4", optional = true }
sqlalchemy = { version = "^2", optional = true }
pymssql = { version = "^2", optional = true }
pymysql = { version = "^1", extras = ["rsa"], optional = true }
neo4j = { version = "^6", optional = true }
openfga-sdk = { version = "*", optional = true }
opensearch-py = { version = "^3", optional = true, markers = "python_version < '4.0'" }
oracledb = { version = "^3", optional = true }
pika = { version = "^1", optional = true }
redis = { version = "^7", optional = true }
selenium = { version = "^4", optional = true }
weaviate-client = { version = "^4", optional = true }
chromadb-client = { version = "^1", optional = true }
qdrant-client = { version = "^1", optional = true }
bcrypt = { version = "^5", optional = true }
azure-cosmos = { version = "^4", optional = true }
cryptography = { version = "*", optional = true }
trino = { version = "*", optional = true }
ibm_db_sa = { version = "*", optional = true, markers = "platform_machine != 'aarch64' and platform_machine != 'arm64'" }
pydantic = { version = "^2", optional = true } # upgrade for 3.14 compat (uses pyo3)
rpds-py = { version = "*", optional = true }
grpcio = { version = "^1", optional = true }
markupsafe = { version = "^3", optional = true }
ujson = { version = "^5", optional = true }
aiohttp = { version = "^3", optional = true }
grpcio-tools = { version = "^1", optional = true }
msgpack = { version = "^1", optional = true }
pandas = { version = "^2", optional = true }
httpx = { version = "*", optional = true }
httpcore = { version = "^1", optional = true } # we could fix this for everyone but this is httpx's responsibility
[tool.poetry.group.numpy_old.dependencies]
numpy = { version = ">=2.0", optional = true, markers = "python_version < '3.11'" }
[tool.poetry.group.numpy_new.dependencies]
numpy = { version = ">=2.3.4", optional = true, markers = "python_version >= '3.11'" }
[tool.poetry.group.clickhouse-driver_old.dependencies]
clickhouse-driver = { version = ">=0.1.5", optional = true, markers = "python_version < '3.11'" }
[tool.poetry.group.clickhouse-driver_new.dependencies]
clickhouse-driver = { version = ">=0.2.10", optional = true, markers = "python_version >= '3.11' and python_version < '4'" }
[tool.poetry.extras]
arangodb = ["python-arango"]
aws = ["boto3", "httpx"]
azurite = ["azure-storage-blob"]
cassandra = []
clickhouse = ["clickhouse-driver"]
cosmosdb = ["azure-cosmos"]
cockroachdb = []
db2 = ["sqlalchemy", "ibm_db_sa"]
elasticsearch = []
generic = [
"httpx",
"redis",
] # The advance doctests for ServerContainer require redis
test_module_import = ["httpx"]
google = ["google-cloud-pubsub", "google-cloud-datastore"]
influxdb = ["influxdb", "influxdb-client"]
k3s = ["kubernetes", "pyyaml"]
kafka = []
keycloak = ["python-keycloak"]
localstack = ["boto3"]
mailpit = ["cryptography"]
memcached = []
minio = ["minio"]
milvus = []
mongodb = ["pymongo"]
mqtt = []
mssql = ["sqlalchemy", "pymssql"]
mysql = ["sqlalchemy", "pymysql"]
nats = ["nats-py"]
neo4j = ["neo4j"]
nginx = []
openfga = ["openfga-sdk"]
opensearch = ["opensearch-py"]
ollama = []
oracle = ["sqlalchemy", "oracledb"]
oracle-free = ["sqlalchemy", "oracledb"]
postgres = []
qdrant = ["qdrant-client"]
rabbitmq = ["pika"]
redis = ["redis"]
registry = ["bcrypt"]
selenium = ["selenium"]
scylla = ["cassandra-driver"]
sftp = ["cryptography"]
vault = []
weaviate = ["weaviate-client"]
chroma = ["chromadb-client"]
trino = ["trino"]
[tool.poetry.group.dev.dependencies]
pytest = "^9"
pytest-asyncio = "^1"
pytest-cov = "^7"
pytest-mock = "^3"
mypy = "^1"
ruff = "*"
pre-commit = "^4"
sphinx = [
{ version = "^8", markers = "python_version < '3.11'" },
{ version = "^9", markers = "python_version >= '3.11'" },
]
twine = "6.2.0"
anyio = "^4"
# for tests only
sqlalchemy = "^2"
psycopg2-binary = "2.9.11"
pg8000 = "1.31.5"
psycopg = "^3"
cassandra-driver = "^3"
kafka-python-ng = "^2"
hvac = { version = "^2", markers = "python_version < '4.0'" }
pymilvus = "^2"
paho-mqtt = "^2"
sqlalchemy-cockroachdb = "^2"
paramiko = "^4"
types-paramiko = "^4"
[[tool.poetry.source]]
name = "PyPI-public"
url = "https://pypi.org/simple/"
priority = "primary"
[tool.black]
line-length = 120
[tool.pytest.ini_options]
addopts = "--tb=short --strict-markers"
log_cli = true
log_cli_level = "INFO"
markers = [
"inside_docker_check: mark test to be used to validate DinD/DooD is working as expected",
]
filterwarnings = [
# Suppress expected deprecation warnings for backwards compatibility testing
"ignore:The @wait_container_is_ready decorator is deprecated.*:DeprecationWarning",
"ignore:The wait_for function is deprecated and will be removed in a future version.*:DeprecationWarning",
"ignore:The wait_for_logs function with string or callable predicates is deprecated.*:DeprecationWarning",
]
[tool.coverage.run]
branch = true
omit = ["oracle.py"]
[tool.coverage.report]
exclude_lines = [
"pass",
"raise NotImplementedError", # TODO: used in core/generic.py, not sure we need DbContainer
]
[tool.ruff]
target-version = "py39"
line-length = 120
fix = true
src = ["core", "modules/*"]
[tool.ruff.lint]
fixable = ["I"]
exclude = ["**/tests/**/*.py"]
select = [
# flake8-2020
"YTT",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-print
"T20",
# flake8-pytest-style
"PT",
# flake8-simplify
"SIM",
# flake8-tidy-imports
"TID",
# flake8-type-checking
"TC",
# isort
"I",
# mccabe
"C90",
# pycodestyle
"E",
"W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# TODO: security, enable via line below
# "S",
]
ignore = [
# line too long (already checked by black)
"E501",
# the must-have __init__.py (we are using package namespaces)
"INP001",
# we do have some imports shadowing builtins
"A004",
]
[tool.ruff.lint.per-file-ignores]
"**/example_*.py" = ["T201"]
"**/examples/*.py" = ["T201"]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.ruff.lint.flake8-type-checking]
strict = true
[tool.mypy]
python_version = "3.10"
namespace_packages = true
explicit_package_bases = true
pretty = true
show_error_codes = true
warn_return_any = true
strict = true
# fast_module_lookup = true
modules = ["testcontainers.core"]
mypy_path = [
"core",
# "modules/arangodb",
# "modules/azurite",
# "modules/cassandra",
# "modules/clickhouse",
# "modules/elasticsearch",
# "modules/google",
# "modules/k3s",
# "modules/kafka",
# "modules/keycloak",
# "modules/localstack",
"modules/mailpit",
# "modules/minio",
# "modules/mongodb",
# "modules/mssql",
# "modules/mysql",
# "modules/neo4j",
# "modules/nginx",
# "modules/ollama",
# "modules/openfga",
# "modules/opensearch",
# "modules/oracle",
# "modules/postgres",
# "modules/rabbitmq",
# "modules/redis",
# "modules/selenium"
"modules/sftp",
# "modules/vault"
# "modules/weaviate"
]
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[[tool.mypy.overrides]]
module = ['tests.*']
# in pytest we allow fixtures to be more relaxed, though we check the untyped functions
check_untyped_defs = true
disable_error_code = ['no-untyped-def']
[[tool.mypy.overrides]]
module = ['docker.*']
# docker still doesn't have type annotations (not even 7.0)
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ['wrapt.*']
# wrapt doesn't have type annotations
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ['requests.*']
# requests doesn't have type annotations
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ['testcontainers.registry']
ignore_missing_imports = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"