Render review questions through in2lambda.draft.export.render - #20
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
package.renderlooks forin2lambda.draft.renderand raisesRenderUnavailablewhen it is absent, so every review printsin2lambda render is not there yetand names questions by source lines. The pinned in2lambda has the function atin2lambda.draft.export.render(draft, output_dir) -> list[Path]: it writes one PDF per question, namedquestion_000_Question_1.pdfand so on, compiled as the PDF generator compiles them, and needs pandoc and xelatex.Call it. In package.py,
render(draft, out_dir)callsin2lambda.draft.export.render, maps each written PDF back to its question key (q1,q2, ... in the order the set holds them, which is the orderSet.problems()gives), and returns that mapping; deleteRenderUnavailableand thenot there yetmessage. Where xelatex is not installed, in2lambda's own error is reported as the render stage line and the review carries on withnot rendered, as today. Update tests/test_pipeline.py's review tests to assert that a review lists each question's PDF path, with the compile skipped whereneeds_compilersays so, and remove docs/how-it-works.md's and README.md'snot there yetpassages, describing therenderline as2 questions to OUT/render. Done whenin2lambda-agent run tests/fixtures/... --review sampleon a machine with xelatex prints PDF paths in the listing, and the docs test passes.Workbench ticket t25.