Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (98 loc) · 2.78 KB
/
Copy pathpyproject.toml
File metadata and controls
111 lines (98 loc) · 2.78 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
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "distributed-task-queue"
version = "0.1.0"
description = "A Redis Streams-backed distributed task queue engine with retries, idempotency, dead-letter queues, backpressure, and real-time observability."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "Sachu James" }]
dependencies = [
"fastapi>=0.115,<0.118",
"uvicorn[standard]>=0.30,<0.34",
"pydantic>=2.9,<2.12",
"pydantic-settings>=2.5,<2.9",
"redis>=5.2,<7",
"prometheus_client>=0.20,<0.23",
]
[project.optional-dependencies]
test = [
"pytest>=8.3,<9",
"pytest-asyncio>=0.24,<0.27",
"httpx>=0.27,<0.29",
]
lint = [
"ruff>=0.7,<0.10",
"mypy>=1.13,<1.17",
]
[project.scripts]
dtq = "dtq_cli.cli:main"
[tool.setuptools]
packages = [
"dtq_core",
"dtq_config",
"dtq_queue",
"dtq_retry",
"dtq_idem",
"dtq_events",
"dtq_metrics",
"dtq_tasks",
"dtq_api",
"dtq_worker",
"dtq_cli",
]
[tool.setuptools.package-dir]
dtq_core = "packages/core/dtq_core"
dtq_config = "packages/config/dtq_config"
dtq_queue = "packages/queue/dtq_queue"
dtq_retry = "packages/retry/dtq_retry"
dtq_idem = "packages/idempotency/dtq_idem"
dtq_events = "packages/events/dtq_events"
dtq_metrics = "packages/metrics/dtq_metrics"
dtq_tasks = "packages/tasks/dtq_tasks"
dtq_api = "apps/api/dtq_api"
dtq_worker = "apps/worker/dtq_worker"
dtq_cli = "apps/cli/dtq_cli"
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "ASYNC", "S"]
[tool.ruff.lint.flake8-bandit]
check-typed-exception = true
[tool.ruff.lint.per-file-ignores]
# S101 (assert use) is the standard assertion mechanism in tests.
"tests/**" = ["S101"]
# FastAPI's Depends() in parameter defaults is the framework's DI pattern.
"apps/api/dtq_api/routes/*.py" = ["B008"]
"apps/api/dtq_api/main.py" = ["B008"]
[tool.mypy]
python_version = "3.12"
strict = true
ignore_missing_imports = true
# The dtq_* packages are installed via a custom editable finder that mypy
# cannot see; point mypy at the source trees so imports resolve to real types
# instead of silently becoming Any.
mypy_path = [
"packages/core",
"packages/config",
"packages/queue",
"packages/events",
"packages/idempotency",
"packages/metrics",
"packages/retry",
"packages/tasks",
"apps/api",
"apps/cli",
"apps/worker",
]
# Tests were written against the old config where dtq_* imports resolved to
# Any; real type resolution now surfaces pre-existing strict violations in
# them. Keep their previous pass-through behavior instead of breaking them.
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
[tool.coverage.run]
omit = ["tests/*"]