-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (126 loc) · 3.25 KB
/
pyproject.toml
File metadata and controls
143 lines (126 loc) · 3.25 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
[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.9,<3",
"aiosqlite>=0.20",
"websockets>=13",
"structlog>=24",
"pyjwt[crypto]>=2.9",
"click>=8.1",
"python-ulid>=2",
"opentelemetry-api>=1.27,<2",
]
[project.optional-dependencies]
jwks = ["httpx>=0.27"]
[dependency-groups]
dev = [
"pytest>=8",
"pytest-asyncio>=0.24",
"pytest-cov>=5",
"pytest-randomly>=3.15",
"pytest-timeout>=2.3",
"hypothesis>=6.112",
"dirty-equals>=0.8",
"ruff>=0.6",
"pyright>=1.1",
"opentelemetry-sdk>=1.27,<2",
"aiohttp>=3.10",
"starlette>=0.38",
"httpx>=0.27",
"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=90 --timeout=10"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["arcp"]
branch = true
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
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]