Skip to content

feat(chunk): add chunk review markdown export - #11

Merged
MMoney1988 merged 1 commit into
mainfrom
feat/chunk-review-markdown-export
May 20, 2026
Merged

feat(chunk): add chunk review markdown export#11
MMoney1988 merged 1 commit into
mainfrom
feat/chunk-review-markdown-export

Conversation

@MMoney1988

Copy link
Copy Markdown
Owner

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

  • Add pdf_quality_report.chunk_review with a pure Markdown renderer and thin CLI adapter.
  • Add the pdf-quality-chunk-review package entry point.
  • Document the export in README and a short how-to.
  • Add tests for rendering, empty output, nested section paths, missing citation, CLI behavior, aliases, invalid inputs, and example exports.

Tests

  • .venv/bin/python -m pytest -p no:cacheprovider tests -> 83 passed
  • .venv/bin/python -m ruff check src tests -> passed
  • git 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 -> passed

Risks

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.

@MMoney1988
MMoney1988 merged commit 229c074 into main May 20, 2026
1 check passed
@MMoney1988
MMoney1988 deleted the feat/chunk-review-markdown-export branch May 20, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant