From 8f1d72d1d8e11a448378de03945fd007c04ad798 Mon Sep 17 00:00:00 2001 From: aszerW Date: Fri, 8 May 2026 22:38:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(report):=20HTML=E6=8A=A5=E5=91=8A=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E5=9B=BA=E5=AE=9A=E4=B8=BAstrategy=5Freport.?= =?UTF-8?q?html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改内容: - visualization/report_generator/generate_report.py - 移除日期时间后缀,固定输出文件名为 strategy_report.html - 方便用户快速访问和更新报告 效果: - 每次生成报告都覆盖同一文件 - 文件路径固定: reports/strategy_report.html - 无需查找最新的时间戳文件 --- visualization/report_generator/generate_report.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/visualization/report_generator/generate_report.py b/visualization/report_generator/generate_report.py index fa5c352..ea8cdd6 100644 --- a/visualization/report_generator/generate_report.py +++ b/visualization/report_generator/generate_report.py @@ -372,11 +372,8 @@ class ReportGenerator: # 创建输出目录 os.makedirs(output_dir, exist_ok=True) - # 保存报告 - output_file = os.path.join( - output_dir, - f'strategy_report_{datetime.now().strftime("%Y%m%d_%H%M%S")}.html' - ) + # 保存报告(固定文件名) + output_file = os.path.join(output_dir, 'strategy_report.html') with open(output_file, 'w', encoding='utf-8') as f: f.write(html)