- pyproject.toml 新增 jsonschema>=4.23 依赖 - engine.py: json.loads 后 jsonschema.validate,校验失败按解析失败重试(带错误信息) - 新增 3 用例:违规重试成功/耗尽 parse_error 含详情/合法一次通过 - 全量 163 passed / 100.00% 覆盖(936 stmts/238 br),fail_under=99 达标
43 lines
968 B
TOML
43 lines
968 B
TOML
[build-system]
|
|
requires = ["setuptools>=69"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "genesis"
|
|
version = "0.1.0"
|
|
description = "概要设计书自动生成 Agent"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"pydantic>=2.13",
|
|
"pydantic-settings>=2.15",
|
|
"pyyaml>=6.0",
|
|
"openpyxl>=3.1",
|
|
"python-docx>=1.0",
|
|
"httpx>=0.28",
|
|
"jinja2>=3.1",
|
|
"jsonschema>=4.23",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8.0", "pytest-cov>=7.0"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "--cov=genesis --cov-report=term-missing"
|
|
|
|
[tool.coverage.run]
|
|
# 仅统计 src/genesis 业务代码(不含 tests 自身)
|
|
source = ["genesis"]
|
|
# 测量分支覆盖
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
# 覆盖率门槛:低于该值 pytest 失败(红线,防止回归)
|
|
fail_under = 99
|
|
# 跳过 __init__.py 等空文件干扰
|
|
skip_empty = true
|
|
# 按语句总数降序展示
|
|
sort = "miss" |