feat: add edge-case supplement pages to test PDF (sections 10-13) - #4
Closed
MatMatt wants to merge 5 commits into
Closed
feat: add edge-case supplement pages to test PDF (sections 10-13)#4MatMatt wants to merge 5 commits into
MatMatt wants to merge 5 commits into
Conversation
Append 3 new pages (sections 10-13) to pdf2md_edgecases.pdf covering 6 previously untested scenarios: - Clickable hyperlink annotations (PDF link annotations) - \DATA / <sub> / <sup> / <br> raw patterns (_sanitise_for_typst) - 130171 display math + ambiguous notation (math false-positive guards) - Running header variants per page (chrome.py detection) - Page-N-of-M footer pattern (lint.py chrome-leak guard) - Nested image paths + doubled URL schemes (lint.py) Regeneration: python3 src/pdf2md/tests/gen_edgecase_supplement.py
Remove 1990-2018_PUM_v1_short.pdf (real CLMS PUM snippet) and port the 2 pagefilter regression tests to pdf2md_edgecases.pdf. The synthetic edgecases PDF covers both scenarios: - recall: pages 9 (aerial photo raster) and 11 (vector figure) detected - skip rate: 7 text-only pages correctly skipped
- --main-llm <slug> replaces --model (--model kept as deprecated alias) - --figure-llm <slug> for Phase 1 figure detection - pdf2md --setup now fetches model catalogue from OpenRouter API and presents a numbered pick list (multimodal first, sorted by price) for both conversion LLM and figure-detection LLM - Config saved to ~/.pdf2md/config.json under 'model' and 'figure_llm'
Collaborator
Author
|
Merged into feat/review-module (PR #3) — all changes now in one branch |
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.
Summary
Appends 3 new pages (sections 10-13) to
pdf2md_edgecases.pdf, covering 6 edge cases the original 11-page PDF didn't test.Also adds a maintainable generator at
tests/gen_edgecase_supplement.py— run from repo root to regenerate.What's added
\DATA/<sub>/<sup>/<br>raw patterns_sanitise_for_typst()Phase 2.5c130249display math (Einstein equations) + ambiguous notation (error bars, set notation, stats)chrome.pyper-page variant detectionlint.pychrome-leak guardlint.py"File name too long" guardVerification
All 9 checks pass:
How to regenerate
The original 11-page PDF is preserved — only the supplement is rebuilt and merged.
@MatMatt — tagging you for review