Repository navigation
[Final Evaluation] Restore real module logic, fix gitignore, CI matrix, README license link - #13
Merged
Merged
Conversation
khadijja1
approved these changes
Sep 27, 2026
Khubaib8281
approved these changes
Sep 28, 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?
Two things, both urgent for final evaluation: (1) restores the real, tested implementations of preprocessor.py, ocr.py, and all four parser files (cnic, matric, intermediate, _federal_board), which PR #9's automated CI fix had silently replaced with minimal stubs, losing rotation correction, deskew, the calibrated blur threshold, and most CNIC/certificate field extraction. (2) Addresses review feedback: fixes the .gitignore pycache pattern and removes already-committed pycache files, links the actual LICENSE file from the README instead of just naming it, and updates ci.yml to test against Python 3.9, 3.10, 3.11, and 3.12.
Which module(s) does it touch?
docling_pk/preprocessor.py, docling_pk/ocr.py, docling_pk/parsers/cnic.py, docling_pk/parsers/matric.py, docling_pk/parsers/intermediate.py, docling_pk/parsers/_federal_board.py, .gitignore, .github/workflows/ci.yml, README.md.
How did you test it?
The restored module code is the exact implementation already tested extensively throughout the project against real CNIC and certificate photos (documented in the design doc's Technical Approach section). The CI/gitignore/README changes are configuration only, verified by inspection against the review comments received.
Edge cases handled:
Same edge cases as the original tested modules: FileNotFoundError/ValueError/TooBlurryError on bad input, graceful None-with-warning on unrecoverable fields, ASCII-only digit matching to avoid silently accepting Unicode digit misreads as wrong numbers.
Checklist: