-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
69 lines (61 loc) · 2.23 KB
/
pyproject.toml
File metadata and controls
69 lines (61 loc) · 2.23 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
[build-system]
requires = ["maturin>=1.7,<2.0"]
build-backend="maturin"
[project]
name = "opsqueue"
readme="README.md"
description = "Python client library for Opsqueue, the lightweight batch processing queue for heavy loads"
license="MIT"
keywords=["queue", "processing", "paralellism", "distributed", "batch", "producer", "consumer"]
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dynamic = ["version"]
dependencies = [
# Default serialization format:
"cbor2",
# Tracing:
"opentelemetry-api",
"opentelemetry-sdk",
"opentelemetry-exporter-otlp",
# Testing:
"opnieuw",
"psutil",
]
[project.urls]
Repository="https://github.com/channable/opsqueue"
Issues="https://github.com/channable/opsqueue/issues"
[tool.maturin]
features = ["pyo3/extension-module"]
python-source = "python"
module-name = "opsqueue.opsqueue_internal"
# We specify test-dependencies here (and have them loaded through `.setup_local_venv.sh`)
# because otherwise `pytest` won't be able to see the locally build python package!
#
# Extra notes:
#
# - We rely on `pytest-parallel` rather than `pytest-xdist`
# since we currently rely on `multiprocessing`'s `fork` strategy,
# which is incompatible
# since pytest-xdist always spawns threads internally
# c.f. https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
# - We need to specify `py` as extra requirement because of this issue: https://github.com/kevlened/pytest-parallel/issues/118
[project.optional-dependencies]
test = [
"pytest==8.3.3",
"pytest-random-order==1.1.1",
"pytest-parallel==0.1.1",
"pytest-timeout==2.4.0",
"py==1.11.0", # Needs to be manually specified because of this issue: https://github.com/kevlened/pytest-parallel/issues/118
]
[tool.pytest.ini_options]
# We ensure tests never rely on global state,
# by running them in a random order, and in parallel:
addopts = "--random-order --workers=auto"
# Individual tests should be very fast. They should never take multiple seconds
# If after 20sec (accomodating for a toaster-like PC) there is no progress,
# assume a deadlock
timeout=20