PDF report generation can overwrite HTML when the destination extension is not lowercase .html
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza por la derivación de la ruta del PDF en Report/Program.cs y sigue cómo se pasa el destino al convertidor. Comprueba la configuración de pruebas existente del iniciador del informe para ver si cubre regresiones relacionadas con extensiones en mayúsculas y rutas de entrada y salida idénticas. El trabajo estará terminado cuando report.HTML siga intacto, se genere un PDF independiente y pasen los casos de regresión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 22.5k
- Forks
- 5.4k
- Merge medio
- 22 h 6 min
- PR fusionados (30 d)
- 81
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de QuantConnect/Lean
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
QuantConnect/Lean#10059 ·
Los mantenedores suelen responder en 1 día
-
Library Request: highspyAbiertolibrary-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
QuantConnect/Lean#10034 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
QuantConnect/Lean#9965 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
QuantConnect/Lean#9955 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
QuantConnect/Lean#9953 ·
Los mantenedores suelen responder en 1 día
Todos los issues de QuantConnect/Lean
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/aspnetcore#70545 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día