Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion docs/regression_manifest.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,43 @@
"require_engine_success": true,
"min_score_after": 90,
"min_score_improvement": 3
},
{
"name": "minimal_paper_case",
"format_file": "examples/fixtures/synthetic_format_guide.docx",
"paper_file": "examples/fixtures/synthetic_paper.docx",
"engine": "python",
"strict_required_sections": false,
"require_content_unchanged": true,
"require_engine_success": true,
"min_score_after": 50,
"min_score_improvement": 1,
"validation_command": "python -m paper_format_agent.cli --format examples/fixtures/synthetic_format_guide.docx --paper examples/fixtures/synthetic_paper.docx --output /tmp/test_output"
},
{
"name": "strict_sections_case",
"format_file": "examples/fixtures/synthetic_format_guide.docx",
"paper_file": "examples/fixtures/synthetic_paper.docx",
"engine": "python",
"strict_required_sections": true,
"require_content_unchanged": true,
"require_engine_success": true,
"min_score_after": 80,
"min_score_improvement": 2,
"validation_command": "python -m paper_format_agent.cli --format examples/fixtures/synthetic_format_guide.docx --paper examples/fixtures/synthetic_paper.docx --strict-sections --output /tmp/test_output"
},
{
"name": "no_engine_case",
"format_file": "examples/fixtures/synthetic_format_guide.docx",
"paper_file": "examples/fixtures/synthetic_paper.docx",
"engine": "none",
"strict_required_sections": false,
"require_content_unchanged": true,
"require_engine_success": false,
"min_score_after": 40,
"min_score_improvement": 0,
"validation_command": "python -m paper_format_agent.cli --format examples/fixtures/synthetic_format_guide.docx --paper examples/fixtures/synthetic_paper.docx --no-engine --output /tmp/test_output",
"expected_output": "format_report.json with score >= 40 and no engine_report.json"
}
]
}
}
12 changes: 6 additions & 6 deletions paper_format_agent/scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,17 +564,17 @@ def save_reports(report: dict[str, Any], out_json: str | Path, out_html: str | P
".score-box{display:inline-block;padding:15px 30px;background:#667eea;color:white;border-radius:8px;font-size:24px;font-weight:bold}"
"</style></head><body>"
"<div class='container'>"
"<h1>🎓 论文格式质量评分报告</h1>"
"<h1>📄 Format Quality Score Report</h1><p><em>Review the penalties and diagnostics below to understand what failed and what to fix next.</em></p>"
+ comparison_html +
f"<p><b>最终得分:</b><span class='score-box'>{score_display}</span> / 100</p>"
f"<p><b>原始质量分:</b>{report.get('raw_quality_score', report['score'])}</p>"
"<h2>⚠️ 扣分项</h2><table><tr><th></th><th>扣分</th></tr>"
f"<p><b>Final Score:</b> <span class='score-box'>{score_display}</span> / 100</p>"
f"<p><b>Raw Quality Score:</b> {report.get('raw_quality_score', report['score'])}</p>"
"<h2>⚠️ Penalties — What Failed</h2><table><tr><th>Check</th><th>Points Deducted</th></tr>"
+ "".join(rows)
+ "</table>"
+ "<h2>Actionable diagnostics</h2><table><tr><th>Severity</th><th>Check</th><th>Problem</th><th>Suggested fix</th></tr>"
+ "<h2>🔧 Diagnostics — What to Fix Next</h2><table><tr><th>Severity</th><th>Check</th><th>Problem</th><th>Suggested Fix</th></tr>"
+ "".join(diag_rows)
+ "</table>"
+ "<h2>📋 特征详情</h2><table><tr><th></th><th></th></tr>"
+ "<h2>📋 Feature Details</h2><table><tr><th>Feature</th><th>Value</th></tr>"
+ "".join(feat_rows)
+ "</table></div></body></html>"
)
Expand Down