feat(chunk): add chunk review markdown export - #11
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.
Summary
Adds a separate review-oriented Markdown export for chunk records built from normalized blocks.
Why
Chunk records now carry source references and heading context, but JSONL is awkward for quick human inspection. This gives reviewers a deterministic Markdown sheet without opening or transforming the JSONL output.
What
pdf_quality_report.chunk_reviewwith a pure Markdown renderer and thin CLI adapter.pdf-quality-chunk-reviewpackage entry point.Tests
.venv/bin/python -m pytest -p no:cacheprovider tests-> 83 passed.venv/bin/python -m ruff check src tests-> passedgit diff --check-> passed.venv/bin/python -m pdf_quality_report.chunk_review --help-> passed.venv/bin/python -m pdf_quality_report.chunk_review --input examples/mdpi_pdf_elements/page_006/normalized_blocks.json --output /tmp/page_006_chunk_review.md-> passed.venv/bin/python -m pdf_quality_report.chunk_review --input examples/mdpi_pdf_elements/page_012/normalized_blocks.json --output /tmp/page_012_chunk_review.md-> passed.venv/bin/pdf-quality-chunk-review --help-> passedRisks
Low. This adds a separate CLI and does not change chunk JSONL schema, quality report logic, existing exports, retrieval behavior, OCR behavior, or parser assumptions.
Rollback
Revert this PR to remove the new CLI, entry point, docs, and tests. Existing chunk export behavior remains unaffected.