Treat a figure as content, not as a block to ignore - #24
Open
peterbjohnson wants to merge 2 commits into
Open
peterbjohnson wants to merge 2 commits into
peterbjohnson wants to merge 2 commits into
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.
On UCL_MechEng/Worksheet_2.pdf the spec the agent wrote holds
ignore: Para text~'Figure [0-9]+:'. Mathpix writes each figure as one paragraph, the image line then its caption, so that selector marks every figure of the sheet ignored: Figure 1 (the Lucy Ashton, which Q4 is about), Figure 2 (the model test results Q4 ii) asks the student to read) and Figure 3 (the drag-coefficient curve Q4 asks the student to digitise). The set built with no images, and nothing in the run said so.A figure is content. In in2lambda_agent/spec.py, the spec-writing prompt says that a paragraph holding an image belongs to the question or part it illustrates, and that
ignoreis for headings, rubric and page furniture, never for a paragraph holding![. Afterspec run, the pipeline reads the draft and counts the blocks marked ignore whose lines hold an image reference; if there are any, it reports them as a coverage finding (b10 (lines 29-30) holds an image and is marked ignore) and the spec is rewritten once with that finding, as t16's iteration does for unassigned blocks; if the rewrite still ignores an image, the run carries on and the stage line says how many images were dropped. A test in tests/test_spec.py runs a source with a figure paragraph through a fake backend whose first spec ignores it and asserts that the second call's prompt names the block and that the stage line reports it. Done when a run over Worksheet_2.pdf builds a zip whose media/ holds the three figures, or says which it dropped.Workbench ticket t24.