fix(report): HTML报告文件名固定为strategy_report.html
修改内容: - visualization/report_generator/generate_report.py - 移除日期时间后缀,固定输出文件名为 strategy_report.html - 方便用户快速访问和更新报告 效果: - 每次生成报告都覆盖同一文件 - 文件路径固定: reports/strategy_report.html - 无需查找最新的时间戳文件
This commit is contained in:
@@ -372,11 +372,8 @@ class ReportGenerator:
|
|||||||
# 创建输出目录
|
# 创建输出目录
|
||||||
os.makedirs(output_dir, exist_ok=True)
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
|
|
||||||
# 保存报告
|
# 保存报告(固定文件名)
|
||||||
output_file = os.path.join(
|
output_file = os.path.join(output_dir, 'strategy_report.html')
|
||||||
output_dir,
|
|
||||||
f'strategy_report_{datetime.now().strftime("%Y%m%d_%H%M%S")}.html'
|
|
||||||
)
|
|
||||||
|
|
||||||
with open(output_file, 'w', encoding='utf-8') as f:
|
with open(output_file, 'w', encoding='utf-8') as f:
|
||||||
f.write(html)
|
f.write(html)
|
||||||
|
|||||||
Reference in New Issue
Block a user