-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (139 loc) · 4.08 KB
/
pyproject.toml
File metadata and controls
156 lines (139 loc) · 4.08 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
[project]
name = "arcp"
version = "1.1.0"
description = "Reference Python implementation of the Agent Runtime Control Protocol (ARCP) v1.1"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "ARCP Reference" }]
dependencies = [
"pydantic>=2.13.4,<3",
"aiosqlite>=0.22.1",
"websockets>=16.0",
"structlog>=25.5.0",
"pyjwt[crypto]>=2.13.0",
"click>=8.4.1",
"python-ulid>=3.1.0",
"opentelemetry-api>=1.42.1,<2",
]
[project.optional-dependencies]
jwks = ["httpx>=0.28.1"]
[dependency-groups]
dev = [
"pytest>=9.0.3",
"pytest-asyncio>=1.3.0",
"pytest-cov>=7.1.0",
"pytest-randomly>=4.1.0",
"pytest-timeout>=2.4.0",
"hypothesis>=6.152.9",
"dirty-equals>=0.11",
"ruff>=0.15.14",
"pyright>=1.1.409",
"opentelemetry-sdk>=1.42.1,<2",
"aiohttp>=3.13.5",
"starlette>=1.0.1",
"httpx>=0.28.1",
"mypy>=2.1.0",
]
[project.scripts]
arcp = "arcp.cli:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/arcp"]
[tool.pyright]
include = ["src/arcp", "tests"]
strict = ["src/arcp"]
pythonVersion = "3.11"
typeCheckingMode = "standard"
reportMissingTypeStubs = false
venvPath = "."
venv = ".venv"
[tool.ruff]
line-length = 100
target-version = "py311"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", "F", "I", "N", "UP", "B", "C4", "C90", "SIM", "RUF",
"PTH", "PT", "RET", "TRY", "ASYNC", "ARG", "PERF", "PLR",
]
ignore = [
"E501", "TRY003", "TRY004", "TRY203", "N818",
"RUF002", "RUF006", "PERF401",
# PLR rules we don't enforce (kept narrow):
"PLR2004", # magic-value-comparison: too noisy for protocol code
"PLR0904", # too-many-public-methods (15 covered by guide §0 manually)
]
[tool.ruff.lint.mccabe]
max-complexity = 8
[tool.ruff.lint.pylint]
max-args = 5
max-branches = 12
max-returns = 6
max-statements = 50
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"B011", "B017", "ARG001", "ARG002", "ARG005", "ASYNC109", "ASYNC110",
"E402", "PT011", "PT017", "SIM102", "SIM117", "N806", "TRY300",
"C901", "PLR0913", "PLR0912", "PLR0915",
]
"examples/**" = [
"ARG001", "ARG002", "ARG005", "B017", "N806", "PT017", "SIM102",
"SIM117", "ASYNC110", "TRY300", "C901", "PLR0913", "PLR0912", "PLR0915",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.11"
strict = true
warn_unreachable = true
files = ["src/arcp"]
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["tests.*", "examples.*"]
ignore_errors = true
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-ra --strict-markers --strict-config --cov=arcp --cov-fail-under=89 --cov-branch --timeout=10"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["arcp"]
branch = true
# Keep this list short — widening it hides real gaps. Each omission is
# either a thin CLI/entrypoint wrapper exercised via `python -m arcp`,
# a transport/middleware adapter exercised by integration tests instead
# of unit tests, or a persistence layer (`SqliteEventLog`) that requires
# an `aiosqlite` fixture to drive end-to-end and is itself covered by
# the CLI replay path.
omit = [
"src/arcp/cli.py",
"src/arcp/__main__.py",
"src/arcp/middleware/asgi.py",
"src/arcp/middleware/aiohttp.py",
"src/arcp/middleware/otel.py",
"src/arcp/_transport/stdio.py",
"src/arcp/_transport/websocket.py",
"src/arcp/_store/eventlog.py",
"src/arcp/_auth/jwt.py",
]
[tool.coverage.report]
show_missing = true
# Coverage floor (combined line + branch). `branch=true` ensures branch
# coverage is part of this number, so this single threshold guards
# against both line and branch regressions and makes branch shortfalls
# visible in the same failure path that catches line shortfalls. CI
# also passes `--cov-branch` explicitly via pytest addopts to make this
# invariant locally reproducible.
fail_under = 89
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]