Skip to content

Commit d4d522c

Browse files
⬆️ add simple non-regression testing (#183)
1 parent b9be223 commit d4d522c

File tree

52 files changed

+1264
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1264
-297
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ jobs:
4747
pip install -e .[test]
4848
4949
- name: Testing the code with pytest
50+
env:
51+
MINDEE_API_KEY: ${{ secrets.MINDEE_API_KEY_SE_TESTS }}
5052
run: |
5153
pytest

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ api_response = mindee_client.parse(
123123
## Further Reading
124124
Complete details on the working of the library are available in the following guides:
125125

126-
* [Python Getting started](https://developers.mindee.com/docs/python-getting-started)
126+
* [Getting started](https://developers.mindee.com/docs/python-getting-started)
127127
* [Python Command Line Interface (CLI)](https://developers.mindee.com/docs/python-cli)
128128
* [Python Custom APIs (API Builder)](https://developers.mindee.com/docs/python-api-builder)
129129
* [Python Invoice OCR](https://developers.mindee.com/docs/python-invoice-ocr)
@@ -133,13 +133,13 @@ Complete details on the working of the library are available in the following gu
133133
* [Python Proof of Address OCR](https://developers.mindee.com/docs/python-proof-of-address-ocr)
134134
* [Python EU License Plate OCR](https://developers.mindee.com/docs/python-eu-license-plate-ocr)
135135
* [Python FR Bank Account Detail OCR](https://developers.mindee.com/docs/python-fr-bank-account-details-ocr)
136-
* [Python FR Carte Grise OCR](https://developers.mindee.com/docs/python-fr-carte-vitale-ocr)
136+
* [Python FR Carte Grise OCR](https://developers.mindee.com/docs/python-fr-carte-grise-ocr)
137137
* [Python FR Carte Vitale OCR](https://developers.mindee.com/docs/python-fr-carte-vitale-ocr)
138138
* [Python FR ID Card OCR](https://developers.mindee.com/docs/python-fr-id-card-ocr)
139139
* [Python FR Petrol Receipts OCR](https://developers.mindee.com/docs/python-fr-petrol-receipts-ocr)
140140
* [Python US Bank Check OCR](https://developers.mindee.com/docs/python-us-bank-checks-ocr)
141-
* [Python US W9 OCR](https://developers.mindee.com/docs/python-us-driver-license-ocr)
142-
* [Python US Driver License OCR](https://developers.mindee.com/docs/python-us-w9-ocr)
141+
* [Python US W9 OCR](https://developers.mindee.com/docs/python-us-w9-ocr)
142+
* [Python US Driver License OCR](https://developers.mindee.com/docs/python-us-driver-license-ocr)
143143
* [Python Barcode Reader API](https://developers.mindee.com/docs/python-barcode-reader-api)
144144
* [Python Cropper API](https://developers.mindee.com/docs/python-cropper-api)
145145
* [Python Invoice Splitter API](https://developers.mindee.com/docs/python-invoice-splitter-api)

docs/extras/guide/bank_account_details_v2.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Page 0
7171
## Standard Fields
7272
These fields are generic and used in several products.
7373

74-
### Basic Field
74+
### BasicField
7575
Each prediction object contains a set of fields that inherit from the generic `BaseField` class.
7676
A typical `BaseField` object will have the following attributes:
7777

@@ -87,7 +87,7 @@ A typical `BaseField` object will have the following attributes:
8787

8888
Aside from the previous attributes, all basic fields have access to a custom `__str__` method that can be used to print their value as a string.
8989

90-
### String Field
90+
### StringField
9191
The text field `StringField` only has one constraint: its **value** is an `Optional[str]`.
9292

9393
## Specific Fields
@@ -107,7 +107,7 @@ A `BankAccountDetailsV2Bban` implements the following attributes:
107107
The following fields are extracted for Bank Account Details V2:
108108

109109
## Account Holder's Names
110-
**account_holders_names** : Full extraction of the account holders names.
110+
**account_holders_names** ([StringField](#stringfield)): Full extraction of the account holders names.
111111

112112
```py
113113
print(result.document.inference.prediction.account_holders_names.value)
@@ -121,14 +121,14 @@ print(result.document.inference.prediction.bban.value)
121121
```
122122

123123
## IBAN
124-
**iban** : Full extraction of the IBAN number.
124+
**iban** ([StringField](#stringfield)): Full extraction of the IBAN number.
125125

126126
```py
127127
print(result.document.inference.prediction.iban.value)
128128
```
129129

130130
## SWIFT Code
131-
**swift_code** : Full extraction of the SWIFT code.
131+
**swift_code** ([StringField](#stringfield)): Full extraction of the SWIFT code.
132132

133133
```py
134134
print(result.document.inference.prediction.swift_code.value)

docs/extras/guide/bank_check_v1.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Page 0
7171
## Standard Fields
7272
These fields are generic and used in several products.
7373

74-
### Basic Field
74+
### BasicField
7575
Each prediction object contains a set of fields that inherit from the generic `BaseField` class.
7676
A typical `BaseField` object will have the following attributes:
7777

@@ -88,22 +88,22 @@ A typical `BaseField` object will have the following attributes:
8888
Aside from the previous attributes, all basic fields have access to a custom `__str__` method that can be used to print their value as a string.
8989

9090

91-
### Amount Field
91+
### AmountField
9292
The amount field `AmountField` only has one constraint: its **value** is an `Optional[float]`.
9393

94-
### Date Field
94+
### DateField
9595
Aside from the basic `BaseField` attributes, the date field `DateField` also implements the following:
9696

9797
* **date_object** (`Date`): an accessible representation of the value as a python object. Can be `None`.
9898

9999

100-
### Position Field
100+
### PositionField
101101
The position field `PositionField` does not implement all the basic `BaseField` attributes, only **bounding_box**, **polygon** and **page_id**. On top of these, it has access to:
102102

103103
* **rectangle** (`[Point, Point, Point, Point]`): a Polygon with four points that may be oriented (even beyond canvas).
104104
* **quadrangle** (`[Point, Point, Point, Point]`): a free polygon made up of four points.
105105

106-
### String Field
106+
### StringField
107107
The text field `StringField` only has one constraint: its **value** is an `Optional[str]`.
108108

109109
## Page-Level Fields
@@ -113,58 +113,58 @@ Some fields are constrained to the page level, and so will not be retrievable to
113113
The following fields are extracted for Bank Check V1:
114114

115115
## Account Number
116-
**account_number** : The check payer's account number.
116+
**account_number** ([StringField](#stringfield)): The check payer's account number.
117117

118118
```py
119119
print(result.document.inference.prediction.account_number.value)
120120
```
121121

122122
## Amount
123-
**amount** : The amount of the check.
123+
**amount** ([AmountField](#amountfield)): The amount of the check.
124124

125125
```py
126126
print(result.document.inference.prediction.amount.value)
127127
```
128128

129129
## Check Number
130-
**check_number** : The issuer's check number.
130+
**check_number** ([StringField](#stringfield)): The issuer's check number.
131131

132132
```py
133133
print(result.document.inference.prediction.check_number.value)
134134
```
135135

136136
## Check Position
137-
[📄](#page-level-fields "This field is only present on individual pages.")**check_position** : The position of the check on the document.
137+
[📄](#page-level-fields "This field is only present on individual pages.")**check_position** ([PositionField](#positionfield)): The position of the check on the document.
138138

139139
```py
140140
for check_position_elem of result.document.check_position:
141141
print(check_position_elem.polygon)
142142
```
143143

144144
## Check Issue Date
145-
**date** : The date the check was issued.
145+
**date** ([DateField](#datefield)): The date the check was issued.
146146

147147
```py
148148
print(result.document.inference.prediction.date.value)
149149
```
150150

151151
## Payees
152-
**payees** : List of the check's payees (recipients).
152+
**payees** (List[[StringField](#stringfield)]): List of the check's payees (recipients).
153153

154154
```py
155155
for payees_elem in result.document.inference.prediction.payees:
156156
print(payees_elem.value)
157157
```
158158

159159
## Routing Number
160-
**routing_number** : The check issuer's routing number.
160+
**routing_number** ([StringField](#stringfield)): The check issuer's routing number.
161161

162162
```py
163163
print(result.document.inference.prediction.routing_number.value)
164164
```
165165

166166
## Signature Positions
167-
[📄](#page-level-fields "This field is only present on individual pages.")**signatures_positions** : List of signature positions
167+
[📄](#page-level-fields "This field is only present on individual pages.")**signatures_positions** (List[[PositionField](#positionfield)]): List of signature positions
168168

169169
```py
170170
for page in result.document.inference.pages:

docs/extras/guide/barcode_reader_v1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Page 0
6161
## Standard Fields
6262
These fields are generic and used in several products.
6363

64-
### Basic Field
64+
### BasicField
6565
Each prediction object contains a set of fields that inherit from the generic `BaseField` class.
6666
A typical `BaseField` object will have the following attributes:
6767

@@ -77,22 +77,22 @@ A typical `BaseField` object will have the following attributes:
7777

7878
Aside from the previous attributes, all basic fields have access to a custom `__str__` method that can be used to print their value as a string.
7979

80-
### String Field
80+
### StringField
8181
The text field `StringField` only has one constraint: its **value** is an `Optional[str]`.
8282

8383
# Attributes
8484
The following fields are extracted for Barcode Reader V1:
8585

8686
## Barcodes 1D
87-
**codes_1d** : List of decoded 1D barcodes.
87+
**codes_1d** (List[[StringField](#stringfield)]): List of decoded 1D barcodes.
8888

8989
```py
9090
for codes_1d_elem in result.document.inference.prediction.codes_1d:
9191
print(codes_1d_elem.value)
9292
```
9393

9494
## Barcodes 2D
95-
**codes_2d** : List of decoded 2D barcodes.
95+
**codes_2d** (List[[StringField](#stringfield)]): List of decoded 2D barcodes.
9696

9797
```py
9898
for codes_2d_elem in result.document.inference.prediction.codes_2d:

0 commit comments

Comments
 (0)