-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
97 lines (87 loc) · 3.18 KB
/
Copy pathpyproject.toml
File metadata and controls
97 lines (87 loc) · 3.18 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
[project]
name = "ems-analyst-agent"
version = "1.0.0-beta"
requires-python = "==3.13.2"
dependencies = [
"pydantic>=2.9.2",
"pyyaml>=6.0.2",
"pydantic-ai>=1.99.0",
"fastmcp>=3.3.1",
"asyncpg>=0.30.0",
"pgvector>=0.3.6",
"httpx>=0.27.0",
"ems-analyst-mcp",
"feedparser>=6.0.12",
"idna>=3.15",
]
[dependency-groups]
dev = [
"asyncpg-stubs>=0.29",
"bandit>=1.8.0",
"black[d]>=26.3.1",
"deptry>=0.23.0",
"neo4j>=5.0.0",
"pip>=26.1",
"pip-audit>=2.6.1",
"poethepoet>=0.32.0",
"pook>=2.1.1",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.2",
"pytest-cov>=6.0.0",
"ruff>=0.8.4",
"testcontainers[postgres]>=4.9.0",
"ty>=0.0.18",
"types-pyyaml>=6.0",
"ems-analyst-mcp",
"psycopg2-binary>=2.9.12",
]
[tool.poe.tasks]
depcheck = "deptry ."
format = "black ."
lint = "ruff check"
typecheck = "ty check"
audit-src = "bandit -r src/* -s B101"
security = ["audit-src", "audit-packages"]
checks = ["depcheck", "format", "lint", "typecheck", "security"]
healthcheck = "bash -c 'curl -sf -o /dev/null -w \"OpenWeatherMap: %{http_code}\\n\" \"https://api.openweathermap.org/data/2.5/weather?q=London&appid=$OPENWEATHERMAP_API_KEY\" && echo APIS_READY'"
unit = "pytest -vv src/ems_analyst_agent"
integration = "pytest -vv tests/*"
cover = "pytest -vv --cov=src/ems_analyst_agent"
test = ["unit", "healthcheck", "integration"]
eval-live = "python -m ems_analyst_agent.eval"
eval-mcp = "python -m ems_analyst_agent.eval_mcp"
review = "claude 'run code-reviewer agent against diff for quality and elegance'"
commit = "bash -c 'uv run poe checks && uv run poe test && uv run poe review && git add -A && git cz && git push'"
[tool.poe.tasks.audit-packages]
# PIPAPI_PYTHON_LOCATION pins pip-audit to THIS project's venv. Without
# it pip-audit follows an ambient VIRTUAL_ENV and audits whatever
# interpreter is loaded — silently auditing the wrong project.
cmd = "pip-audit --ignore-vuln GHSA-4xh5-x5gv-qwph --ignore-vuln CVE-2026-3219 --ignore-vuln CVE-2026-45409 --ignore-vuln PYSEC-2025-183"
env = { PIPAPI_PYTHON_LOCATION = "${POE_ROOT}/.venv/bin/python" }
[tool.deptry]
known_first_party = ["ems_analyst_agent"]
package_module_name_map = { "psycopg2-binary" = "psycopg2" }
[tool.deptry.per_rule_ignores]
DEP002 = ["ems-analyst-mcp", "idna"]
DEP004 = ["pytest", "pook", "psycopg2"]
[tool.pytest.ini_options]
# src-layout: put src/ on sys.path so `import ems_analyst_agent` resolves
# top-level — matching how the runtime code imports itself (e.g.
# `resources.files("ems_analyst_agent.demo_data")`). Without this the
# suite only passed when the venv happened to carry the package.
pythonpath = ["src"]
[tool.coverage.run]
omit = ["*/test_*.py", "tests/*", "*/main.py", "*/config.py"]
[tool.setuptools.package-data]
# Bundle cfg.defaults.yml + prompt .md files in the wheel so the loaders
# can find them when this package is consumed as a git dep from another
# project's venv (the repo root isn't accessible there).
ems_analyst_agent = [
"cfg.defaults.yml",
"prompts/*.md",
"prompts/**/*.md",
"demo_data/*.csv",
"demo_data/*.json",
]
[tool.uv.sources]
ems-analyst-mcp = { git = "https://gitlab.com/arcnode-io/ems-analyst-mcp.git" }