-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (121 loc) · 3.24 KB
/
pyproject.toml
File metadata and controls
134 lines (121 loc) · 3.24 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
[project]
name = "arcp"
version = "0.1.0"
description = "Reference Python implementation of the Agent Runtime Control Protocol (ARCP) v1.0"
readme = "README.md"
requires-python = ">=3.13"
license = { text = "Apache-2.0" }
authors = [{ name = "ARCP Reference" }]
dependencies = [
"pydantic>=2.7,<3",
"aiosqlite>=0.20",
"websockets>=13",
"structlog>=24",
"pyjwt[crypto]>=2.9",
"click>=8.1",
"jsonschema>=4.23",
]
[dependency-groups]
dev = [
"pytest>=8",
"pytest-asyncio>=0.24",
"pytest-cov>=5",
"ruff>=0.6",
"pyright>=1.1",
"pre-commit>=3",
]
[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.13"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
# Use the local uv-managed venv so third-party imports resolve when analyzing from this directory.
venvPath = "."
venv = ".venv"
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W",
"F",
"I",
"N",
"UP",
"B",
"C4",
"SIM",
"RUF",
"PTH",
"PT",
"RET",
"TRY",
"ASYNC",
"ERA",
"ARG",
"SLF",
"TID",
"PERF",
"D",
]
ignore = [
"E501", # line-too-long: handled by ruff format; surfaced cases are pydantic Field descriptions.
# TRY003: raise-vanilla-args. The ARCPError exception class already carries
# typed structure (`code: ErrorCode`, `details: dict`); the message string
# is the human-readable explanation. Splitting one subclass per message
# would add code without adding type structure. Same applies to
# TransportClosed and the two pydantic field-validator ValueErrors.
"TRY003",
# Google docstring convention: docs for __init__ live in the class docstring;
# magic methods don't need their own docstring; D203/D213 conflict with
# D211/D212 respectively.
"D107",
"D105",
"D203",
"D213",
]
[tool.ruff.lint.per-file-ignores]
# Tools (`async def f(ctx, args)`) and inbound handlers (`async def h(env)`)
# have protocol-mandated signatures; unused-arg lints are noise here.
# ASYNC109 in tests fires on test-helper polling deadlines that use a
# `timeout=` parameter as a wall-clock budget rather than asyncio.timeout().
# Tests and examples are self-documenting via descriptive function names; D
# (pydocstyle) noise is not paying its way there.
"tests/**" = ["B011", "ARG001", "ARG002", "ASYNC109", "D"]
"examples/**" = ["ARG001", "ARG002", "D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-ra --strict-markers --strict-config --cov=arcp --cov-fail-under=90"
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["arcp"]
branch = true
omit = [
# The CLI is a thin click wrapper and is exercised end-to-end out of band.
"src/arcp/cli.py",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]