PDF report generation can overwrite HTML when the destination extension is not lowercase .html
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với việc xác định đường dẫn PDF trong Report/Program.cs và theo dõi cách đích được truyền cho bộ chuyển đổi. Kiểm tra thiết lập kiểm thử hiện có của trình khởi chạy báo cáo để xem có bao phủ hồi quy cho phần mở rộng viết hoa và đường dẫn đầu vào, đầu ra giống hệt nhau hay không. Hoàn thành khi report.HTML vẫn nguyên vẹn, một tệp PDF riêng được tạo và các trường hợp hồi quy vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The report launcher derives the PDF output path with destination.Replace(".html", ".pdf") in Report/Program.cs. With a destination such as report.HTML, the replacement does nothing: wkhtmltopdf receives the same path for its input and output. It overwrites the HTML with PDF content, writes no report.pdf, and exits successfully.
This path derivation is already present on master.
Reproduction
-
Build the report launcher in Release and install
xvfb-runandwkhtmltopdf. -
Use
Report/config.example.jsonasconfig.json, with the report template and CSS available in the working directory. -
Point
backtest-data-source-fileatTests/TestData/test_report_data.json, setlive-data-source-fileto an empty string, and set:{ "report-format": "PDF", "report-destination": "/tmp/report-repro/report.HTML", "close-automatically": true } -
Create
/tmp/report-reproand rundotnet /path/to/QuantConnect.Report.dllfrom the report working directory.
Observed with the real converter: launcher exit code 0; report.HTML starts with %PDF- instead of HTML; report.pdf is absent.
The converter behavior can also be reproduced independently:
mkdir -p /tmp/report-repro
printf '%s\n' '<!doctype html><html><body>Report</body></html>' > /tmp/report-repro/report.HTML
xvfb-run --server-args='-screen 0, 1600x1200x24+32' wkhtmltopdf /tmp/report-repro/report.HTML /tmp/report-repro/report.HTML
Expected
Keep the generated HTML and write a separate PDF alongside it, without allowing the two output paths to coincide. Suggestion: derive the PDF filename with Path.ChangeExtension and add regression coverage for non-lowercase extensions and identical input/output paths.
- Ngôn ngữ chính
- C#
- Star
- 22.5k
- Fork
- 5.4k
- Merge trung bình
- 22 giờ 6 phút
- Pull request đã merge (30 ngày)
- 81
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantConnect/Lean
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantConnect/Lean#10059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Library Request: highspyĐang mởlibrary-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantConnect/Lean#10034 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
QuantConnect/Lean#9965 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
QuantConnect/Lean#9955 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
QuantConnect/Lean#9953 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QuantConnect/Lean
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/aspnetcore#70545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày