-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (124 loc) · 4.5 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (124 loc) · 4.5 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
[build-system]
requires = ["uv_build>=0.11.27,<0.13.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
# Ship two top-level packages in one wheel: the runtime, and the generated
# wire-protocol bindings (reactor_wire.v1). The bindings are not committed; the
# build vendors them from the pinned wire/v* release into src/reactor_wire/
# before packaging (see scripts/fetch-wire.py and the build make target).
module-name = ["reactor_runtime", "reactor_wire"]
namespace = true
# The released wire-protocol language package this runtime vendors. CalVer,
# matching a wire/v<version> GitHub release tag (e.g. 1.20260618.42). Bump it to
# adopt a release; buf breaking keeps the line compatible. The `wire-check` task
# gates the pin against proto/, so a release cannot ship a schema older than the
# sources it was built from.
[tool.reactor-wire]
version = "1.20260722.6"
[project]
name = "reactor-runtime"
version = "3.1.2"
description = "A Python framework for building real-time, interactive video models"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
authors = [{ name = "Reactor", email = "team@reactor.inc" }]
requires-python = ">=3.12"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"av>=18.0.0",
"fastapi>=0.139.0",
"numpy>=2.1",
"prometheus-client>=0.26.0",
"protobuf>=7.35.1",
"pyyaml>=6.0.3",
"reactor-webrtc==0.10.0",
"uvicorn>=0.49.0",
]
[project.urls]
Source = "https://github.com/reactor-team/reactor-runtime"
[dependency-groups]
dev = [
"httpx>=0.28.1",
"opencv-python-headless>=4.10",
"pillow>=10.1",
"pytest",
"pytest-asyncio",
"types-protobuf",
"types-pyyaml>=6.0.12.20260518",
]
[tool.ruff]
line-length = 100
src = ["src", "tests", "examples"]
# Honour the excludes below even when the pre-commit hook passes file paths
# explicitly, so the vendored protobuf bindings are never linted.
force-exclude = true
# Vendored protobuf bindings are generated, never linted or hand-edited.
extend-exclude = [
"src/reactor_wire",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade (keeps syntax at the 3.12 floor)
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"RET", # return statements
"RUF", # ruff-specific
"D", # pydocstyle
"PT", # pytest style
"ASYNC", # async pitfalls
"TID", # tidy imports (bans relative-import escapes)
]
ignore = [
"D105", # magic methods rarely need docstrings
"D107", # __init__ is documented on the class
]
[tool.ruff.lint.isort]
# The example models are first-party even though they live outside the package.
# The generated wire bindings (reactor_wire) are first-party too, but they are
# gitignored and generated on demand, so declare them explicitly to keep import
# order deterministic whether or not codegen has run in the checkout.
known-first-party = ["examples", "reactor_wire"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
[tool.ty.environment]
python = ".venv"
python-version = "3.12"
# Import roots ty would not otherwise search: the repo root, so the example
# models (`examples`, first-party but outside the package) resolve the way
# pytest's pythonpath makes them importable; the WebRTC test directory, so
# its tests can import their sibling `conftest` for the shared peer fakes; and
# the contract suite, so its tests can import their sibling `contract_helpers`.
extra-paths = [".", "tests/unit/transport/webrtc", "tests/contract"]
[tool.ty.src]
# Check the package, its tests, and the example models; scripts/ ships developer
# tooling that is not part of the published package surface.
include = ["src", "tests", "examples"]
# Generated bindings ship their own stubs.
exclude = [
"src/reactor_wire",
# Registry-isolation scaffolding: it saves and restores the process-global
# registries through their dynamic mapping surface, so it is not shipped
# code and is kept out of the strict check.
"tests/unit/conftest.py",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
# The example models live at the repo root (outside the package) so they are not
# shipped; put the root on the path so the suite can import them.
pythonpath = ["."]