Repository navigation
Feat/v1 overhaul - #14
Merged
Merged
Conversation
…ields Library (src/ layout): - extract(): paths, bytes, arrays, PIL, PDF, CNIC front+back lists; auto document type; DocumentResult with per-field status and reason - OCR backends: RapidOCR (default, CPU, no PyTorch) and EasyOCR (optional 'urdu' extra, also used as an independent verifier) - Orientation scoring robust to Urdu-script noise and to engines that rotate tall crops; skew from text-line angles; micro-text filtering with an adaptive ink-only re-read; quality warnings instead of blur rejection - CNIC: label geometry, chronological dates, CNIC/gender parity, digit-only re-reads, back side, experimental Urdu address with lexicon correction - Matric/Intermediate: column-aligned marks table validated against TOTAL, subject sums and marks-in-words; board detection - Degree/transcript parser (new) - CLI: extract, batch, info, --version Fixes from v0.1: extractor.py SyntaxError, missing top-level extract(), unpackaged CLI entry point, orientation picking Urdu noise, no-op deskew, 'Name' returned as father's name, non-ASCII Windows paths.
- 214 unit tests on constructed OCR layouts (no models; 92% coverage) - 42 end-to-end tests with real OCR on synthetic fixtures, including the invariant that no field is returned 'ok' with a wrong value - benchmarks/synthetic/generate.py: fabricated, clearly stamped specimens (no emblems, photos or seals); 23 committed fixtures covering clean, rotated, skewed, photographed, low-res, blurry and occluded cases - benchmarks/run_benchmark.py: accuracy, coverage, precision, ok-precision, CER, marks rows, latency - Results: synthetic report, CPU-only run, and aggregate-only real-sample summary (no personal data)
- README: install options, usage, supported fields, accuracy, limitations, privacy - docs/design_doc.md (v1) and docs/benchmark.md - CHANGELOG, CONTRIBUTING, PR template with benchmark and privacy checks - CI: ruff, format, mypy; tests on Python 3.9-3.12 (+Windows, macOS) with a 90% coverage gate; end-to-end OCR job; build, twine check and clean-venv install smoke test - Release: PyPI trusted publishing on version tags
…tale hints - Depend on opencv-python (the distribution RapidOCR requires) instead of opencv-python-headless, so only one cv2 is installed - CI: install libgl1/libglib2.0-0 on Linux runners; README note for slim images - requirements.txt points at pyproject.toml (was the stale v0.1 stack) - RapidOCR import hint no longer references a removed extra Verified: 256 tests pass against the built wheel on Python 3.9, 3.10, 3.11 and 3.12 on both Windows and Linux (93% coverage); extras resolve on all four; actionlint clean.
On PR #14 two Linux test jobs stalled for over 15 minutes inside apt-get update (package mirror), while identical jobs passed. The libraries are preinstalled on GitHub runners, so the step now only calls apt when libGL/libgthread are missing, retries mirror fetches, and is capped at 5 minutes.
Collaborator
Author
Khubaib8281
approved these changes
Oct 1, 2026
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.




What does this PR do?
Rebuilds docling-pk into a release-ready v1.0.0: layout-aware extraction for CNIC (front + back), Matric, Intermediate and Degree/Transcript, with per-field confidence, status and reason, plus tests, CI, docs and a PyPI release workflow.
Results
okare correct; 30/30 marks rows exact.Key changes
extractor.pySyntaxError, missingfrom docling_pk import extract, unpackaged CLI entry point, orientation picking Urdu noise, no-op deskew.[urdu]extra for the Urdu address and second-engine verification. Rationale in docs/design_doc.md §5.1.How was it tested?
256 tests (214 unit + 42 end-to-end OCR), 93% coverage, run against the built wheel on Python 3.9, 3.10, 3.11, 3.12 on Windows and Linux. ruff, mypy and actionlint clean.
Checklist