From b100da29a97b44289be48e8d406c2ec836a8344a Mon Sep 17 00:00:00 2001 From: Max Parke Date: Tue, 26 May 2026 16:51:22 -0400 Subject: [PATCH] chore(deps): drop unused runtime deps and exclude tests from wheel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Audit (AGX1-292) found that the published wheel declared 8 deps with zero import sites in `src/`, plus shipped its own test files under `src/agentex/lib/.../tests/` — which forced `pytest` and `pytest-asyncio` to appear as runtime deps. Dropped: tornado, ipykernel, tzlocal, tzdata, datadog, anthropic, pytest, pytest-asyncio. Also strips the `[cli]` extra from `mcp` (only `StdioServerParameters` is imported). Hatchling wheel `exclude` added so the test trees stop shipping. The Jinja templates under `lib/cli/templates/**/test_agent.py.j2` are intentionally preserved — they render into scaffolded user projects. Verified locally: - `Requires-Dist` count 44 → 37 - Test files in wheel 24 → 0 - `.j2` agent templates still present (10) Follow-ups in AGX1-292: extras-based split of ADK/server deps, and lazy imports under `agentex.lib.adk` to keep that safe. Co-Authored-By: Claude Opus 4.7 (1M context) --- pyproject.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bc210cace..662f72ea9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,6 @@ dependencies = [ "rich>=13.9.2,<14", "fastapi>=0.115.0", "starlette>=0.49.1", - "tornado>=6.5.5", "uvicorn>=0.31.1", "watchfiles>=0.24.0,<1.0", "python-on-whales>=0.73.0,<0.74", @@ -33,24 +32,17 @@ dependencies = [ "litellm>=1.83.7,<2", "kubernetes>=25.0.0,<36.0.0", "jinja2>=3.1.3,<4", - "mcp[cli]>=1.4.1", + "mcp>=1.4.1", "scale-gp>=0.1.0a59", "openai-agents==0.14.1", "pydantic-ai-slim>=1.0,<2", - "tzlocal>=5.3.1", - "tzdata>=2025.2", - "pytest>=8.4.0", "json_log_formatter>=1.1.1", - "pytest-asyncio>=1.0.0", "scale-gp-beta>=0.2.0", - "ipykernel>=6.29.5", "openai>=2.2,<3", # Required by openai-agents; litellm now supports openai 2.x (issue #13711 resolved: https://github.com/BerriAI/litellm/issues/13711) "cloudpickle>=3.1.1", - "datadog>=0.52.1", "ddtrace>=3.13.0", "yaspin>=3.1.0", "claude-agent-sdk>=0.1.0", - "anthropic>=0.40.0", "langgraph-checkpoint>=2.0.0", "opentelemetry-sdk>=1.20.0", "opentelemetry-api>=1.20.0", @@ -152,6 +144,14 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/agentex"] +# Don't ship internal test files in the wheel. `lib/cli/templates/**/test_agent.py.j2` +# is intentionally kept — those render into user projects. +exclude = [ + "src/agentex/lib/**/tests/**", + "src/agentex/lib/**/test_*.py", + "src/agentex/lib/**/conftest.py", + "src/agentex/lib/**/pytest.ini", +] [tool.hatch.build.targets.sdist] # Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)