Skip to content

[Final Evaluation] Restore real module logic, fix gitignore, CI matrix, README license link - #13

Merged
Khubaib8281 merged 5 commits into
mainfrom
final-evaluation
Sep 28, 2026
Merged

Khubaib8281 merged 5 commits into
mainfrom
final-evaluation

Conversation

@M-O-J-U

@M-O-J-U M-O-J-U commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • Tests added or updated (already present from earlier PRs, unaffected by this restoration)
  • Docstrings on all new public functions
  • No unused imports
  • README updated (License section now links the real file)
  • Lead Engineer has reviewed and approved before submitting to director (flagging directly for Khubaib's review given this restores code his own automated fix had overwritten)

@Khubaib8281
Khubaib8281 merged commit 007c2b1 into main Sep 28, 2026
4 checks passed
@Khubaib8281
Khubaib8281 deleted the final-evaluation branch September 28, 2026 16:06
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.

3 participants