Skip to content

Commit 96713dc

Browse files
♻️ update test samples lib (#264)
1 parent 8dca258 commit 96713dc

File tree

18 files changed

+42
-26
lines changed

18 files changed

+42
-26
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

2828
- name: Cache dependencies
29-
uses: actions/cache@v3
29+
uses: actions/cache@v4
3030
with:
3131
path: ~/.cache/pip
3232
key: ${{ runner.os }}-docs-${{ hashFiles('setup.cfg') }}

.github/workflows/license.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- uses: actions/checkout@v4
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

2525
- name: Cache dependencies
26-
uses: actions/cache@v3
26+
uses: actions/cache@v4
2727
with:
2828
path: ~/.cache/pip
2929
key: ${{ runner.os }}-lic-${{ hashFiles('**/setup.cfg') }}

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- uses: actions/checkout@v4
1818

1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323

2424
- name: Cache dependencies
25-
uses: actions/cache@v3
25+
uses: actions/cache@v4
2626
with:
2727
path: ~/.cache/pip
2828
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}
@@ -36,7 +36,7 @@ jobs:
3636
pip install -e .[dev]
3737
3838
- name: Cache pre-commit
39-
uses: actions/cache@v3
39+
uses: actions/cache@v4
4040
with:
4141
path: ~/.cache/pre-commit
4242
key: ${{ runner.os }}-prec-${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

2828
- name: Cache dependencies
29-
uses: actions/cache@v3
29+
uses: actions/cache@v4
3030
with:
3131
path: ~/.cache/pip
3232
key: ${{ runner.os }}-build-${{ hashFiles('setup.cfg') }}

.github/workflows/test-code-samples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
submodules: recursive
2626

2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

3232
- name: Cache dependencies
33-
uses: actions/cache@v3
33+
uses: actions/cache@v4
3434
with:
3535
path: ~/.cache/pip
3636
key: ${{ runner.os }}-samples-${{ hashFiles('**/setup.cfg') }}

.github/workflows/test-integration.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
pull_request:
88
workflow_run:
99
workflows: ["Test Code Samples"]
10-
branches:
11-
- '*'
1210
types:
1311
- completed
1412

@@ -32,12 +30,12 @@ jobs:
3230
submodules: recursive
3331

3432
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3634
with:
3735
python-version: ${{ matrix.python-version }}
3836

3937
- name: Cache dependencies
40-
uses: actions/cache@v3
38+
uses: actions/cache@v4
4139
with:
4240
path: ~/.cache/pip
4341
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}

.github/workflows/test-regression.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
pull_request:
88
workflow_run:
99
workflows: ["Test Code Samples"]
10-
branches:
11-
- '*'
1210
types:
1311
- completed
1412

@@ -32,12 +30,12 @@ jobs:
3230
submodules: recursive
3331

3432
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3634
with:
3735
python-version: ${{ matrix.python-version }}
3836

3937
- name: Cache dependencies
40-
uses: actions/cache@v3
38+
uses: actions/cache@v4
4139
with:
4240
path: ~/.cache/pip
4341
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}

.github/workflows/unit-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
submodules: recursive
3030

3131
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

3636
- name: Cache dependencies
37-
uses: actions/cache@v3
37+
uses: actions/cache@v4
3838
with:
3939
path: ~/.cache/pip
4040
key: ${{ runner.os }}-dev-${{ hashFiles('setup.cfg') }}

docs/extras/guide/generated_v1.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,20 @@ Generated builds always have access to at least two attributes:
8787

8888
## Fields
8989

90-
**fields** (`Dict[str`: `List[Union[`[GeneratedListField](#generated-list-field)[GeneratedObjectField](#generated-object-field), `(#stringfield)[StringField]]]`):
90+
**fields** (`Dict[str`: `List[Union[`[GeneratedListField](#generated-list-field), [GeneratedObjectField](#generated-object-field), `(#stringfield)[StringField]]]`):
9191

9292
```python
9393
print(str(result.document.inference.prediction.fields["my-field"]))
9494
```
9595

96+
### Nested fields
97+
98+
If your field `my-field` is a `GeneratedObjectField`, you can access its individual properties using the following syntax:
99+
100+
```python
101+
print(str(result.document.inference.prediction.fields["my-field"].my_attribute))
102+
```
103+
96104
# Questions?
97105

98106
[Join our Slack](https://join.slack.com/t/mindee-community/shared_invite/zt-2d0ds7dtz-DPAF81ZqTy20chsYpQBW5g)

examples/auto_invoice_splitter_extraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22

33
from mindee import Client
4-
from mindee.extraction.common.pdf_extractor import PdfExtractor
4+
from mindee.extraction.pdf_extractor import PdfExtractor
55
from mindee.input import PathInput
66
from mindee.product import InvoiceSplitterV1, InvoiceV4
77

0 commit comments

Comments
 (0)