Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
254 lines (239 loc) · 8.46 KB
/
Copy pathpyproject.toml
File metadata and controls
254 lines (239 loc) · 8.46 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = ["testmcpy/research"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by formatter
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"E722", # bare except - used intentionally in some places
"B904", # raise from within except - style preference
"B028", # warnings.warn without stacklevel
"UP007", # Use X | Y instead of Optional - breaks Typer on Python 3.10
"UP045", # Use X | None instead of Optional - breaks Typer on Python 3.10
]
[tool.ruff.lint.per-file-ignores]
"testmcpy/cli.py" = ["F401"] # Imports used for availability checks
"tests/test_url_protection.py" = ["F841"] # Intentional variable assignment for documentation
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = true
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["unit_tests", "integration_tests"]
pythonpath = ["oauth-probe"]
python_files = ["test_*.py"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
markers = [
"e2e: End-to-end UI tests (requires playwright)",
]
filterwarnings = [
# fastmcp's JWT verifier imports authlib.jose, which emits a deprecation
# notice we can't act on. Silenced at runtime in testmcpy/__init__.py; also
# ignored here so it stays out of the pytest warnings summary.
"ignore:authlib.jose module is deprecated:DeprecationWarning",
]
[tool.coverage.run]
source = ["testmcpy"]
omit = [
"tests/*",
"testmcpy/ui/*",
"testmcpy/research/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.black]
line-length = 100
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
# `testmcpy_oauth_probe` deliberately does NOT ship in this wheel. It is its own
# distribution (`oauth-probe/pyproject.toml`) so CI consumers can install the
# probe without this package's agent/server stack. Shipping it from both would
# put the same import package in two distributions.
[tool.setuptools.packages.find]
where = ["."]
include = ["testmcpy*"]
[tool.setuptools.package-data]
testmcpy = [
"ui/**/*",
"server/**/*",
]
[project]
name = "testmcpy"
version = "0.11.22"
description = "A comprehensive testing framework for validating LLM tool calling capabilities with MCP services"
authors = [{name = "Amin Ghadersohi"}]
license = "Apache-2.0"
readme = "README.md"
requires-python = ">=3.10,<3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"typer>=0.9.0,<1.0.0",
"rich>=13.0.0,<15.0.0",
"pyyaml>=6.0,<7.0",
"requests>=2.28.0,<3.0.0",
"aiohttp>=3.8.0,<4.0.0",
"multidict>=4.5,<7.0",
"ollama>=0.1.0",
"anthropic>=0.39.0,<1.0.0",
# fastmcp >=2.14.5 is required to stay co-installable with
# claude-agent-sdk: <=2.12.5 pins mcp<1.17, but claude-agent-sdk
# 0.2.x requires mcp>=1.23. fastmcp 2.14.5+ permits mcp>=1.24, so
# the resolver picks a single coherent mcp version. Don't loosen
# the lower bound without also re-verifying the agentic smoke test
# in CI (.github/workflows/ci.yml :: docker-claude-cli).
"fastmcp>=2.14.5,<3.0.0",
# Explicit direct bound on `mcp` so the intersection between
# fastmcp's and claude-agent-sdk's transitive pins is documented in
# one place. Without this, mcp's acceptable window is implicit in
# whatever each parent currently ships, and a future bump that
# breaks the intersection would only surface at install time via a
# resolver backtrack message — slow and hard to diagnose. The CI
# `pip check` is the second line of defence; this is the first.
"mcp>=1.24,<2.0",
"httpx>=0.27.0,<1.0.0",
"python-dotenv>=1.0.0,<2.0.0",
"click>=8.0.0,<9.0.0",
"shellingham>=1.3.0,<2.0.0",
"textual>=0.47.0,<1.0.0",
"sqlalchemy>=2.0.0,<3.0.0",
"alembic>=1.13.0,<2.0.0",
# The headless OAuth/MCP probe, published separately so release pipelines
# can install it on its own (httpx + pyyaml only). `testmcpy auth` and
# `testmcpy.oauth_probe` are thin adapters over it, so the dependency is
# required rather than an extra. Compatible-release bound: the probe's
# schemas are versioned in their own contract, not in its version number.
"testmcpy-oauth-probe>=0.1.0,<0.2.0",
]
[project.optional-dependencies]
dev = [
"jsonschema>=4.20.0,<5.0.0",
# testmcpy.qualification counts tokens with o200k_base; it falls back to a
# bytes/4 estimate (and says so) when tiktoken or its vocabulary is missing.
"tiktoken>=0.7.0,<1.0.0",
"ruff>=0.8.0",
"mypy>=1.13.0",
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-asyncio>=0.21.0",
"pre-commit>=3.0.0",
"build>=1.0.0",
"twine>=5.0.0",
"types-pyyaml>=6.0.0",
"types-requests>=2.28.0",
# unit_tests/test_oauth_probe_packaging.py reads pyproject.toml directly to
# keep the two-distribution split honest. tomllib is stdlib from 3.11.
"tomli>=2.0.0; python_version < '3.11'",
"textual-dev>=1.0.0",
]
server = [
"fastapi>=0.104.0,<1.0.0",
"uvicorn[standard]>=0.24.0,<1.0.0",
# websockets>=15.0.1 is required by fastmcp>=2.14 — keep the
# upper bound generous so we don't have to drag this pin every
# time uvicorn/fastmcp bumps a minor.
"websockets>=14.0,<17.0",
# testmcpy/server/websocket.py routes test runs through
# testmcpy/src/test_runner.py, which imports claude_agent_sdk
# for any test using the Claude Agent SDK provider. Without it,
# those tests crash with ModuleNotFoundError at runtime — so the
# SDK belongs in `server`, not only in `sdk`.
#
# 0.2.x is the first line that requires mcp>=1.23 (co-pinned with
# fastmcp>=2.14.5 above). Keep this tight so a future SDK release
# that bumps mcp out of fastmcp's range fails at install time
# instead of at first agentic test run.
"claude-agent-sdk>=0.2.0,<1.0.0",
# openai-agents provides CodexSDKProvider with native MCP support.
# Pinned to 0.17.x — the minor that introduced the agents.mcp /
# agents.models.openai_provider / agents.run_config import paths we rely on.
"openai-agents>=0.17,<0.18",
# google-adk provides GeminiSDKProvider with native MCP support via McpToolset.
# Pinned to 2.x — the version that introduced StreamableHTTPConnectionParams.
# Transitively pulls google-genai>=2.4,<3 and mcp>=1.24,<2 (already pinned).
"google-adk>=2.0.0,<3.0.0",
]
sdk = [
"claude-agent-sdk>=0.2.0,<1.0.0",
"openai-agents>=0.17,<0.18",
"google-adk>=2.0.0,<3.0.0",
]
tui = [
"textual>=0.85.0",
]
e2e = [
"playwright>=1.40.0",
"pytest-playwright>=0.4.0",
]
export = [
"pandas>=2.0.0,<3.0.0",
]
bedrock = [
"boto3>=1.28.0",
]
postgres = [
# Enables TESTMCPY_DB_URL=postgresql+psycopg://... for a shared
# results database. SQLite stays the default.
"psycopg[binary]>=3.1,<4.0",
]
all = [
"fastapi>=0.104.0,<1.0.0",
"uvicorn[standard]>=0.24.0,<1.0.0",
# websockets>=15.0.1 is required by fastmcp>=2.14 — keep the
# upper bound generous so we don't have to drag this pin every
# time uvicorn/fastmcp bumps a minor.
"websockets>=14.0,<17.0",
"claude-agent-sdk>=0.2.0,<1.0.0",
"openai-agents>=0.17,<0.18",
"google-adk>=2.0.0,<3.0.0",
"textual>=0.85.0",
"boto3>=1.28.0",
]
[project.scripts]
# `testmcpy-oauth` is the entry point of the testmcpy-oauth-probe distribution
# depended on above; declaring it here too would make two distributions fight
# over the same console script.
testmcpy = "testmcpy.cli:app"
[project.urls]
Homepage = "https://github.com/preset-io/testmcpy"
Repository = "https://github.com/preset-io/testmcpy"
Issues = "https://github.com/preset-io/testmcpy/issues"