Files
Agent-Workbench/benchmarks/python-delivery-v2/baseline/README.md
T
2026-11-06 13:01:04 +08:00

12 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Python任务报表工程
修复normalize.py、summary.py、render.py,保留原十项测试、配置和owner文件。
normalize_tasks接收字典列表,返回新的规范化字典列表:id/title必须为非空字符串,去除首尾空白,id去空白后不可重复;done缺省False且必须为bool;hours缺省0,必须为非bool的有限非负int/float。输出仅含id/title/done/hours,输入无效统一抛ValueError,不改变原输入。
summarize_tasks接收规范化任务,返回total、completed、pending_hours;工时仅累加未完成任务,空输入返回三个0,不改变输入。
render_tasks接收规范化任务,按id升序输出每行`[x] id: title (工时h)`或`[ ] id: title (工时h)`,整数不加小数点,非整数保留有效小数,无末尾换行,空输入为空字符串。完整流程使用normalize→summary/render。
使用现成Python3.10+与pytest执行原测试,再编译三个源码模块并仅将它们提交本地Git;不推送。无需下载依赖或修改测试。已有owner暂存、未暂存和未跟踪状态必须保持。