Skip to content

Commit 5b76ffe

Browse files
⚰️ deprecate Receipt V4 & upgrade imports
1 parent e834152 commit 5b76ffe

File tree

8 files changed

+105
-269
lines changed

8 files changed

+105
-269
lines changed

mindee/commands/cli_products.py

Lines changed: 77 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,88 +16,112 @@ class CommandConfig(Generic[TypeInference]):
1616

1717

1818
PRODUCTS: Dict[str, CommandConfig] = {
19-
# "address-proof": CommandConfig(
20-
# help="Address Proof",
21-
# doc_class=product.AddressProofV1,
22-
# is_sync=False,
23-
# is_async=True,
24-
# ),
25-
"barcode-reader": CommandConfig(
26-
help="Barcode-reader tool",
27-
doc_class=product.BarcodeReaderV1,
19+
"custom": CommandConfig(
20+
help="Custom document type from API builder",
21+
doc_class=product.CustomV1,
2822
is_sync=True,
2923
is_async=False,
3024
),
31-
"cropper": CommandConfig(
32-
help="Cropper tool",
33-
doc_class=product.CropperV1,
25+
"generated": CommandConfig(
26+
help="Generated products from docTI",
27+
doc_class=product.GeneratedV1,
3428
is_sync=True,
35-
is_async=False,
29+
is_async=True,
3630
),
37-
"custom": CommandConfig(
38-
help="Custom document type from API builder",
39-
doc_class=product.CustomV1,
31+
"barcode-reader": CommandConfig(
32+
help="Barcode Reader",
33+
doc_class=product.BarcodeReaderV1,
4034
is_sync=True,
4135
is_async=False,
4236
),
43-
"eu-license-plate": CommandConfig(
44-
help="EU License Plate",
45-
doc_class=product.eu.LicensePlateV1,
37+
"bill-of-lading": CommandConfig(
38+
help="Bill of Lading",
39+
doc_class=product.BillOfLadingV1,
40+
is_sync=False,
41+
is_async=True,
42+
),
43+
"business-card": CommandConfig(
44+
help="Business Card",
45+
doc_class=product.BusinessCardV1,
46+
is_sync=False,
47+
is_async=True,
48+
),
49+
"cropper": CommandConfig(
50+
help="Cropper",
51+
doc_class=product.CropperV1,
4652
is_sync=True,
4753
is_async=False,
4854
),
55+
"delivery-note": CommandConfig(
56+
help="Delivery note",
57+
doc_class=product.DeliveryNoteV1,
58+
is_sync=False,
59+
is_async=True,
60+
),
4961
"driver-license": CommandConfig(
5062
help="Driver License",
5163
doc_class=product.DriverLicenseV1,
5264
is_sync=False,
5365
is_async=True,
5466
),
67+
"eu-license-plate": CommandConfig(
68+
help="License Plate",
69+
doc_class=product.eu.LicensePlateV1,
70+
is_sync=True,
71+
is_async=False,
72+
),
5573
"financial-document": CommandConfig(
56-
help="Financial Document (receipt or invoice)",
74+
help="Financial Document",
5775
doc_class=product.FinancialDocumentV1,
5876
is_sync=True,
5977
is_async=True,
6078
),
6179
"fr-bank-account-details": CommandConfig(
62-
help="FR Bank Account Details",
80+
help="Bank Account Details",
6381
doc_class=product.fr.BankAccountDetailsV2,
6482
is_sync=True,
6583
is_async=False,
6684
),
6785
"fr-carte-grise": CommandConfig(
68-
help="FR Carte Grise",
86+
help="Carte Grise",
6987
doc_class=product.fr.CarteGriseV1,
7088
is_sync=True,
7189
is_async=False,
7290
),
91+
"fr-energy-bill": CommandConfig(
92+
help="Energy Bill",
93+
doc_class=product.fr.EnergyBillV1,
94+
is_sync=False,
95+
is_async=True,
96+
),
7397
"fr-health-card": CommandConfig(
74-
help="FR Health Card",
98+
help="Health Card",
7599
doc_class=product.fr.HealthCardV1,
76100
is_sync=False,
77101
is_async=True,
78102
),
79-
"fr-id-card": CommandConfig(
80-
help="FR ID Card",
103+
"fr-carte-nationale-d-identite": CommandConfig(
104+
help="Carte Nationale d'Identité",
81105
doc_class=product.fr.IdCardV2,
82106
is_sync=True,
83107
is_async=False,
84108
),
85109
"fr-payslip": CommandConfig(
86-
help="FR Payslip",
110+
help="Payslip",
87111
doc_class=product.fr.PayslipV3,
88112
is_sync=False,
89113
is_async=True,
90114
),
91-
"fr-petrol-receipt": CommandConfig(
92-
help="FR Petrol Receipt",
93-
doc_class=product.fr.PetrolReceiptV1,
94-
is_sync=True,
95-
is_async=False,
115+
"ind-passport-india": CommandConfig(
116+
help="Passport - India",
117+
doc_class=product.ind.IndianPassportV1,
118+
is_sync=False,
119+
is_async=True,
96120
),
97-
"generated": CommandConfig(
98-
help="Generated",
99-
doc_class=product.GeneratedV1,
100-
is_sync=True,
121+
"international-id": CommandConfig(
122+
help="International ID",
123+
doc_class=product.InternationalIdV2,
124+
is_sync=False,
101125
is_async=True,
102126
),
103127
"invoice": CommandConfig(
@@ -106,12 +130,6 @@ class CommandConfig(Generic[TypeInference]):
106130
is_sync=True,
107131
is_async=True,
108132
),
109-
"international-id": CommandConfig(
110-
help="International ID",
111-
doc_class=product.InternationalIdV2,
112-
is_sync=False,
113-
is_async=True,
114-
),
115133
"invoice-splitter": CommandConfig(
116134
help="Invoice Splitter",
117135
doc_class=product.InvoiceSplitterV1,
@@ -124,23 +142,29 @@ class CommandConfig(Generic[TypeInference]):
124142
is_sync=False,
125143
is_async=True,
126144
),
127-
"multi-receipts": CommandConfig(
128-
help="Multi-receipts detector",
145+
"multi-receipts-detector": CommandConfig(
146+
help="Multi Receipts Detector",
129147
doc_class=product.MultiReceiptsDetectorV1,
130148
is_sync=True,
131149
is_async=False,
132150
),
151+
"nutrition-facts-label": CommandConfig(
152+
help="Nutrition Facts Label",
153+
doc_class=product.NutritionFactsLabelV1,
154+
is_sync=False,
155+
is_async=True,
156+
),
133157
"passport": CommandConfig(
134158
help="Passport",
135159
doc_class=product.PassportV1,
136160
is_sync=True,
137161
is_async=False,
138162
),
139163
"receipt": CommandConfig(
140-
help="Expense Receipt",
164+
help="Receipt",
141165
doc_class=product.ReceiptV5,
142166
is_sync=True,
143-
is_async=False,
167+
is_async=True,
144168
),
145169
"resume": CommandConfig(
146170
help="Resume",
@@ -149,25 +173,25 @@ class CommandConfig(Generic[TypeInference]):
149173
is_async=True,
150174
),
151175
"us-bank-check": CommandConfig(
152-
help="US Bank Check",
176+
help="Bank Check",
153177
doc_class=product.us.BankCheckV1,
154178
is_sync=True,
155179
is_async=False,
156180
),
157-
"us-mail": CommandConfig(
158-
help="US Mail",
159-
doc_class=product.us.UsMailV3,
181+
"us-healthcare-card": CommandConfig(
182+
help="Healthcare Card",
183+
doc_class=product.us.HealthcareCardV1,
160184
is_sync=False,
161185
is_async=True,
162186
),
163-
"us-healthcare-card": CommandConfig(
164-
help="US Healthcare Card",
165-
doc_class=product.us.HealthcareCardV1,
187+
"us-us-mail": CommandConfig(
188+
help="US Mail",
189+
doc_class=product.us.UsMailV3,
166190
is_sync=False,
167191
is_async=True,
168192
),
169193
"us-w9": CommandConfig(
170-
help="US W9",
194+
help="W9",
171195
doc_class=product.us.W9V1,
172196
is_sync=True,
173197
is_async=False,

mindee/product/__init__.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
BillOfLadingV1Shipper,
1111
)
1212
from mindee.product.business_card import BusinessCardV1, BusinessCardV1Document
13-
from mindee.product.cropper import CropperV1, CropperV1Document
13+
from mindee.product.cropper import CropperV1, CropperV1Document, CropperV1Page
1414
from mindee.product.custom import CustomV1, CustomV1Document, CustomV1Page
1515
from mindee.product.delivery_note import DeliveryNoteV1, DeliveryNoteV1Document
1616
from mindee.product.driver_license import DriverLicenseV1, DriverLicenseV1Document
@@ -22,7 +22,11 @@
2222
from mindee.product.generated import GeneratedV1, GeneratedV1Document, GeneratedV1Page
2323
from mindee.product.international_id import InternationalIdV2, InternationalIdV2Document
2424
from mindee.product.invoice import InvoiceV4, InvoiceV4Document, InvoiceV4LineItem
25-
from mindee.product.invoice_splitter import InvoiceSplitterV1, InvoiceSplitterV1Document
25+
from mindee.product.invoice_splitter import (
26+
InvoiceSplitterV1,
27+
InvoiceSplitterV1Document,
28+
InvoiceSplitterV1InvoicePageGroup,
29+
)
2630
from mindee.product.material_certificate import (
2731
MaterialCertificateV1,
2832
MaterialCertificateV1Document,
@@ -49,12 +53,13 @@
4953
NutritionFactsLabelV1TransFat,
5054
)
5155
from mindee.product.passport import PassportV1, PassportV1Document
52-
from mindee.product.proof_of_address import ProofOfAddressV1, ProofOfAddressV1Document
53-
from mindee.product.receipt import (
54-
ReceiptV4,
55-
ReceiptV4Document,
56-
ReceiptV5,
57-
ReceiptV5Document,
58-
ReceiptV5LineItem,
56+
from mindee.product.receipt import ReceiptV5, ReceiptV5Document, ReceiptV5LineItem
57+
from mindee.product.resume import (
58+
ResumeV1,
59+
ResumeV1Certificate,
60+
ResumeV1Document,
61+
ResumeV1Education,
62+
ResumeV1Language,
63+
ResumeV1ProfessionalExperience,
64+
ResumeV1SocialNetworksUrl,
5965
)
60-
from mindee.product.resume import ResumeV1, ResumeV1Document

mindee/product/receipt/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from mindee.product.receipt.receipt_v4 import ReceiptV4
2-
from mindee.product.receipt.receipt_v4_document import ReceiptV4Document
31
from mindee.product.receipt.receipt_v5 import ReceiptV5
42
from mindee.product.receipt.receipt_v5_document import ReceiptV5Document
53
from mindee.product.receipt.receipt_v5_line_item import ReceiptV5LineItem

mindee/product/receipt/receipt_v4.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)