Skip to content

Commit 336f655

Browse files
authored
Version 1.7.0
2 parents 780307f + a208b91 commit 336f655

38 files changed

+720
-210
lines changed

.github/workflows/lambda_layers.yml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,38 @@ jobs:
5050
with:
5151
name: textractor-lambda-p310
5252
path: lambda_layer/
53+
lambda-build-p311:
54+
runs-on: ubuntu-latest
55+
container: public.ecr.aws/sam/build-python3.11:latest
56+
steps:
57+
- uses: actions/checkout@v3
58+
with:
59+
ref: 'master'
60+
- name: Install and build
61+
run: |
62+
mkdir -p lambda_layer/python && \
63+
cd lambda_layer/python && \
64+
pip3 install ../../ --target=.
65+
- uses: actions/upload-artifact@v3
66+
with:
67+
name: textractor-lambda-p311
68+
path: lambda_layer/
69+
lambda-build-p312:
70+
runs-on: ubuntu-latest
71+
container: public.ecr.aws/sam/build-python3.12:latest
72+
steps:
73+
- uses: actions/checkout@v3
74+
with:
75+
ref: 'master'
76+
- name: Install and build
77+
run: |
78+
mkdir -p lambda_layer/python && \
79+
cd lambda_layer/python && \
80+
pip3 install ../../ --target=.
81+
- uses: actions/upload-artifact@v3
82+
with:
83+
name: textractor-lambda-p312
84+
path: lambda_layer/
5385
lambda-build-p38-pandas:
5486
runs-on: ubuntu-latest
5587
container: public.ecr.aws/sam/build-python3.8:latest
@@ -101,6 +133,40 @@ jobs:
101133
with:
102134
name: textractor-lambda-p310-pandas
103135
path: lambda_layer/
136+
lambda-build-p311-pandas:
137+
runs-on: ubuntu-latest
138+
container: public.ecr.aws/sam/build-python3.11:latest
139+
steps:
140+
- uses: actions/checkout@v3
141+
with:
142+
ref: 'master'
143+
- name: Install and build
144+
run: |
145+
mkdir -p lambda_layer/python && \
146+
cd lambda_layer/python && \
147+
pip3 install ../../ --target=. && \
148+
pip3 install pandas --target=.
149+
- uses: actions/upload-artifact@v3
150+
with:
151+
name: textractor-lambda-p311-pandas
152+
path: lambda_layer/
153+
lambda-build-p312-pandas:
154+
runs-on: ubuntu-latest
155+
container: public.ecr.aws/sam/build-python3.12:latest
156+
steps:
157+
- uses: actions/checkout@v3
158+
with:
159+
ref: 'master'
160+
- name: Install and build
161+
run: |
162+
mkdir -p lambda_layer/python && \
163+
cd lambda_layer/python && \
164+
pip3 install ../../ --target=. && \
165+
pip3 install pandas --target=.
166+
- uses: actions/upload-artifact@v3
167+
with:
168+
name: textractor-lambda-p312-pandas
169+
path: lambda_layer/
104170
lambda-build-p38-pdf:
105171
runs-on: ubuntu-latest
106172
container: public.ecr.aws/sam/build-python3.8:latest
@@ -216,3 +282,81 @@ jobs:
216282
with:
217283
name: textractor-lambda-p310-pdf
218284
path: lambda_layer/
285+
lambda-build-p311-pdf:
286+
runs-on: ubuntu-latest
287+
container: public.ecr.aws/sam/build-python3.11:latest
288+
steps:
289+
- uses: actions/checkout@v3
290+
with:
291+
ref: 'master'
292+
- name: Install Poppler
293+
run: yum install -y poppler-utils which mlocate openjpeg-devel libjpeg-devel fontconfig-devel libtiff-devel libpng-devel && updatedb && mkdir -p lambda_layer/python/bin
294+
- name: Copy dependencies
295+
run: |
296+
cp /usr/lib64/libpoppler.so* lambda_layer/python/bin/ && \
297+
cp $(which pdftoppm) lambda_layer/python/bin/ && \
298+
cp $(which pdfinfo) lambda_layer/python/bin/ && \
299+
cp $(which pdftocairo) lambda_layer/python/bin/ && \
300+
cp /usr/lib64/libjpeg.so* lambda_layer/python/bin/ && \
301+
cp /usr/lib64/libopenjpeg.so* lambda_layer/python/bin/ && \
302+
cp /usr/lib64/libpng.so* lambda_layer/python/bin/ && \
303+
cp /lib64/libz.so* lambda_layer/python/bin/ && \
304+
cp /usr/lib64/libfreetype.so* lambda_layer/python/bin/ && \
305+
cp /usr/lib64/libfontconfig.so* lambda_layer/python/bin/ && \
306+
cp /usr/lib64/libnss3.so* lambda_layer/python/bin/ && \
307+
cp /usr/lib64/libsmime3.so* lambda_layer/python/bin/ && \
308+
cp /usr/lib64/liblcms2.so* lambda_layer/python/bin/ && \
309+
cp /usr/lib64/libtiff.so* lambda_layer/python/bin/ && \
310+
cp /lib64/libexpat.so* lambda_layer/python/bin/ && \
311+
cp /usr/lib64/libjbig.so* lambda_layer/python/bin/
312+
- name: Install and build
313+
run: |
314+
mkdir -p lambda_layer/python && \
315+
cd lambda_layer/python && \
316+
pip3 install ../../ --target=. && \
317+
pip3 install pdf2image --target=. && \
318+
cd .. \
319+
&& zip -r /textractor.zip python/
320+
- uses: actions/upload-artifact@v3
321+
with:
322+
name: textractor-lambda-p311-pdf
323+
path: lambda_layer/
324+
lambda-build-p312-pdf:
325+
runs-on: ubuntu-latest
326+
container: public.ecr.aws/sam/build-python3.12:latest
327+
steps:
328+
- uses: actions/checkout@v3
329+
with:
330+
ref: 'master'
331+
- name: Install Poppler
332+
run: yum install -y poppler-utils which mlocate openjpeg-devel libjpeg-devel fontconfig-devel libtiff-devel libpng-devel && updatedb && mkdir -p lambda_layer/python/bin
333+
- name: Copy dependencies
334+
run: |
335+
cp /usr/lib64/libpoppler.so* lambda_layer/python/bin/ && \
336+
cp $(which pdftoppm) lambda_layer/python/bin/ && \
337+
cp $(which pdfinfo) lambda_layer/python/bin/ && \
338+
cp $(which pdftocairo) lambda_layer/python/bin/ && \
339+
cp /usr/lib64/libjpeg.so* lambda_layer/python/bin/ && \
340+
cp /usr/lib64/libopenjpeg.so* lambda_layer/python/bin/ && \
341+
cp /usr/lib64/libpng.so* lambda_layer/python/bin/ && \
342+
cp /lib64/libz.so* lambda_layer/python/bin/ && \
343+
cp /usr/lib64/libfreetype.so* lambda_layer/python/bin/ && \
344+
cp /usr/lib64/libfontconfig.so* lambda_layer/python/bin/ && \
345+
cp /usr/lib64/libnss3.so* lambda_layer/python/bin/ && \
346+
cp /usr/lib64/libsmime3.so* lambda_layer/python/bin/ && \
347+
cp /usr/lib64/liblcms2.so* lambda_layer/python/bin/ && \
348+
cp /usr/lib64/libtiff.so* lambda_layer/python/bin/ && \
349+
cp /lib64/libexpat.so* lambda_layer/python/bin/ && \
350+
cp /usr/lib64/libjbig.so* lambda_layer/python/bin/
351+
- name: Install and build
352+
run: |
353+
mkdir -p lambda_layer/python && \
354+
cd lambda_layer/python && \
355+
pip3 install ../../ --target=. && \
356+
pip3 install pdf2image --target=. && \
357+
cd .. \
358+
&& zip -r /textractor.zip python/
359+
- uses: actions/upload-artifact@v3
360+
with:
361+
name: textractor-lambda-p312-pdf
362+
path: lambda_layer/

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
amazon-textract-response-parser>=0.1.45,<2
21
amazon-textract-caller>=0.0.27,<2
32
Pillow
43
tabulate>=0.9,<0.10

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _run(self, command):
4141
setup(
4242
# include data files
4343
name="amazon-textract-textractor",
44-
version="1.6.1",
44+
version="1.7.0",
4545
license="Apache 2.0",
4646
description="A package to use AWS Textract services.",
4747
url="https://github.com/aws-samples/amazon-textract-textractor",
@@ -53,6 +53,7 @@ def _run(self, command):
5353
"Programming Language :: Python :: 3.9",
5454
"Programming Language :: Python :: 3.10",
5555
"Programming Language :: Python :: 3.11",
56+
"Programming Language :: Python :: 3.12",
5657
],
5758
keywords="amazon textract aws ocr document",
5859
packages=find_packages(exclude=["docs", "tests"], ),

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_amzn_q2.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_fake_id.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_form.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_form_1005.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_in-table-title.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_matrix.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

tests/fixtures/saved_api_responses/test_detect_no_duplicate_words_patient_intake_form_sample.png.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)