Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Adding exception to the method. #47

Conversation

THOR300
Copy link
Contributor

@THOR300 THOR300 commented Oct 5, 2023

Bugfix: Vertically Flip Coords


Raise exception for failing to flip coords vertically.

This exception is then defined in the data access library and can be caught by the indexer.

We can then continue to index documents that pass this function and review the logs for documents that need fixing.

@THOR300 THOR300 requested a review from joel-wright October 5, 2023 14:07
@linear
Copy link

linear bot commented Oct 5, 2023

PDCT-471 Bug - Fix parser output method that returns bad text

Currently the method on the ParserOutput object vertically flip text blocks is swallowing errors and returning text blocks that haven't actually been flipped.

We want to log these out and stop the processing of that document as the bad text blocks will still exist in the text block array.

In terms of the indexer code that uses the method, we can continue on documents that have not failed.

Copy link
Contributor

@joel-wright joel-wright left a comment

Choose a reason for hiding this comment

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

A couple of super-minor comments, and maybe we want to document raises VerticalFlipError in the method docstring :)

tests/test_parser_models.py Outdated Show resolved Hide resolved
src/cpr_data_access/parser_models.py Outdated Show resolved Hide resolved
@THOR300 THOR300 merged commit 8964970 into main Oct 5, 2023
4 checks passed
@THOR300 THOR300 deleted the feature/pdct-471-bug-fix-parser-output-method-that-returns-bad-text branch October 5, 2023 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants