Skip to content

Commit 56cd97c

Browse files
authored
✅ conform to new testing data structure (#87)
1 parent 59cbecf commit 56cd97c

36 files changed

+1321
-169
lines changed

mindee/documents/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
self,
3535
input_file: InputDocument,
3636
document_type: str,
37-
api_prediction: dict,
37+
api_prediction: TypeApiPrediction,
3838
page_n: Optional[int] = None,
3939
):
4040
if input_file:

mindee/documents/custom_document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CustomDocument(Document):
1010
def __init__(
1111
self,
1212
document_type: str,
13-
api_prediction=None,
13+
api_prediction: TypeApiPrediction,
1414
input_file=None,
1515
page_n: Optional[int] = None,
1616
):
@@ -51,7 +51,7 @@ def __str__(self) -> str:
5151
name,
5252
" ".join([value["content"] for value in info["values"]]),
5353
)
54-
custom_doc_str += "-----------------\n"
54+
custom_doc_str += "----------------------"
5555
return custom_doc_str
5656

5757
def _checklist(self) -> None:

tests/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
RECEIPT_DATA_DIR = "./tests/data/receipt"
2+
INVOICE_DATA_DIR = "./tests/data/invoice"
3+
PASSPORT_DATA_DIR = "./tests/data/passport"
4+
CUSTOM_DATA_DIR = "./tests/data/custom"

0 commit comments

Comments
 (0)