Skip to content

[Final Evaluation] Restore real working logic across all modules overwritten by PR #9 - #12

Closed
M-O-J-U wants to merge 1 commit into
mainfrom
fix/restore-real-modules
Closed

M-O-J-U wants to merge 1 commit into
mainfrom
fix/restore-real-modules

Conversation

@M-O-J-U

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

Copy link
Copy Markdown
Collaborator

What does this PR do?

Restores the actual, tested implementations of preprocessor.py, ocr.py, and parsers/cnic.py. PR #9 (an automated Copilot fix for the CI failure) replaced these with minimal stub versions to make imports resolve, silently discarding weeks of tested logic: rotation correction, calibrated blur threshold, deskew, and most CNIC field extraction (name, father_name, all three dates, and address were entirely removed, leaving only cnic_number and a naive gender match).

Which module(s) does it touch?

docling_pk/preprocessor.py, docling_pk/ocr.py, docling_pk/parsers/cnic.py. Also removes docling_pk/parsers/pycache (compiled bytecode, should never be committed) and tests/test_placeholder.py (superseded by the real test files already in the repo).

How did you test it?

This is the exact code from feat/preprocessor and feat/ocr, both already tested extensively against real CNIC and certificate photos throughout the project, documented in the design doc's Technical Approach section.

Checklist:

  • Restores previously tested, working code
  • Removes accidentally committed build artifacts
  • Lead Engineer has reviewed and approved before submitting to director (flagging for Khubaib's direct review given the urgency and evaluation timing)

@khadijja1 khadijja1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the pycache folder to maintain a clean repository and avoid conflict. Use Git's .gitignore

@M-O-J-U M-O-J-U changed the title [Urgent] Restore real preprocessing/OCR/CNIC logic overwritten by PR #9 [Final Evaluation] Restore real working logic across all modules overwritten by PR #9 Sep 12, 2026
@M-O-J-U
M-O-J-U requested a review from khadijja1 September 12, 2026 17:36
@Khubaib8281 Khubaib8281 closed this Oct 6, 2026
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