Skip to content

Commit ac790ac

Browse files
authored
feat/add batch file data support (#32)
1 parent f218b7e commit ac790ac

File tree

12 files changed

+105
-265
lines changed

12 files changed

+105
-265
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.14
2+
3+
* **Add support for batch file data**
4+
15
## 0.0.13
26

37
* **Conform to PEP-625 compliance for project naming**

requirements/cli.txt

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.10
3-
# by the following command:
4-
#
5-
# pip-compile ./cli.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile ./cli.in --output-file ./cli.txt --no-strip-extras --python-version 3.10
73
annotated-types==0.7.0
84
# via pydantic
9-
anyio==4.6.0
5+
anyio==4.7.0
106
# via starlette
117
asgiref==3.8.1
128
# via opentelemetry-instrumentation-asgi
@@ -17,95 +13,100 @@ click==8.1.7
1713
# uvicorn
1814
dataclasses-json==0.6.7
1915
# via unstructured-ingest
20-
deprecated==1.2.14
16+
deprecated==1.2.15
2117
# via
2218
# opentelemetry-api
2319
# opentelemetry-exporter-otlp-proto-grpc
2420
# opentelemetry-semantic-conventions
2521
exceptiongroup==1.2.2
2622
# via anyio
27-
fastapi==0.115.0
23+
fastapi==0.115.6
2824
# via -r ./cli.in
29-
googleapis-common-protos==1.65.0
25+
googleapis-common-protos==1.66.0
3026
# via opentelemetry-exporter-otlp-proto-grpc
31-
grpcio==1.66.1
27+
grpcio==1.68.1
3228
# via opentelemetry-exporter-otlp-proto-grpc
3329
h11==0.14.0
3430
# via uvicorn
3531
idna==3.10
3632
# via anyio
37-
importlib-metadata==8.4.0
33+
importlib-metadata==8.5.0
3834
# via opentelemetry-api
39-
marshmallow==3.22.0
35+
marshmallow==3.23.1
4036
# via dataclasses-json
4137
mypy-extensions==1.0.0
4238
# via typing-inspect
43-
numpy==2.1.1
39+
ndjson==0.3.1
40+
# via unstructured-ingest
41+
numpy==2.2.0
4442
# via pandas
45-
opentelemetry-api==1.27.0
43+
opentelemetry-api==1.29.0
4644
# via
4745
# opentelemetry-exporter-otlp-proto-grpc
4846
# opentelemetry-instrumentation
4947
# opentelemetry-instrumentation-asgi
5048
# opentelemetry-instrumentation-fastapi
5149
# opentelemetry-sdk
5250
# opentelemetry-semantic-conventions
53-
opentelemetry-exporter-otlp-proto-common==1.27.0
51+
opentelemetry-exporter-otlp-proto-common==1.29.0
5452
# via opentelemetry-exporter-otlp-proto-grpc
55-
opentelemetry-exporter-otlp-proto-grpc==1.27.0
53+
opentelemetry-exporter-otlp-proto-grpc==1.29.0
5654
# via -r ./cli.in
57-
opentelemetry-instrumentation==0.48b0
55+
opentelemetry-instrumentation==0.50b0
5856
# via
5957
# opentelemetry-instrumentation-asgi
6058
# opentelemetry-instrumentation-fastapi
61-
opentelemetry-instrumentation-asgi==0.48b0
59+
opentelemetry-instrumentation-asgi==0.50b0
6260
# via opentelemetry-instrumentation-fastapi
63-
opentelemetry-instrumentation-fastapi==0.48b0
61+
opentelemetry-instrumentation-fastapi==0.50b0
6462
# via -r ./cli.in
65-
opentelemetry-proto==1.27.0
63+
opentelemetry-proto==1.29.0
6664
# via
6765
# opentelemetry-exporter-otlp-proto-common
6866
# opentelemetry-exporter-otlp-proto-grpc
69-
opentelemetry-sdk==1.27.0
67+
opentelemetry-sdk==1.29.0
7068
# via
7169
# opentelemetry-exporter-otlp-proto-grpc
7270
# unstructured-ingest
73-
opentelemetry-semantic-conventions==0.48b0
71+
opentelemetry-semantic-conventions==0.50b0
7472
# via
73+
# opentelemetry-instrumentation
7574
# opentelemetry-instrumentation-asgi
7675
# opentelemetry-instrumentation-fastapi
7776
# opentelemetry-sdk
78-
opentelemetry-util-http==0.48b0
77+
opentelemetry-util-http==0.50b0
7978
# via
8079
# opentelemetry-instrumentation-asgi
8180
# opentelemetry-instrumentation-fastapi
82-
packaging==24.1
83-
# via marshmallow
81+
packaging==24.2
82+
# via
83+
# marshmallow
84+
# opentelemetry-instrumentation
8485
pandas==2.2.3
8586
# via unstructured-ingest
86-
protobuf==4.25.5
87+
protobuf==5.29.1
8788
# via
8889
# googleapis-common-protos
8990
# opentelemetry-proto
90-
pydantic==2.9.2
91+
pydantic==2.10.3
9192
# via
9293
# fastapi
9394
# unstructured-ingest
94-
pydantic-core==2.23.4
95+
pydantic-core==2.27.1
9596
# via pydantic
9697
python-dateutil==2.9.0.post0
9798
# via
9899
# pandas
99100
# unstructured-ingest
100101
pytz==2024.2
101102
# via pandas
102-
six==1.16.0
103+
six==1.17.0
103104
# via python-dateutil
104105
sniffio==1.3.1
105106
# via anyio
106-
starlette==0.38.6
107+
starlette==0.41.3
107108
# via fastapi
108-
tqdm==4.66.5
109+
tqdm==4.67.1
109110
# via unstructured-ingest
110111
typing-extensions==4.12.2
111112
# via
@@ -121,16 +122,13 @@ typing-inspect==0.9.0
121122
# via dataclasses-json
122123
tzdata==2024.2
123124
# via pandas
124-
unstructured-ingest==0.0.18
125+
unstructured-ingest==0.3.10
125126
# via -r ./cli.in
126-
uvicorn==0.30.6
127+
uvicorn==0.34.0
127128
# via -r ./cli.in
128-
wrapt==1.16.0
129+
wrapt==1.17.0
129130
# via
130131
# deprecated
131132
# opentelemetry-instrumentation
132-
zipp==3.20.2
133+
zipp==3.21.0
133134
# via importlib-metadata
134-
135-
# The following packages are considered to be unsafe in a requirements file:
136-
# setuptools

requirements/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
unstructured-ingest>=0.0.18
1+
unstructured-ingest>=0.3.10

requirements/lint.txt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.10
3-
# by the following command:
4-
#
5-
# pip-compile ./lint.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile ./lint.in --output-file ./lint.txt --no-strip-extras --python-version 3.10
73
autoflake==2.3.1
84
# via -r ./lint.in
9-
black==24.8.0
5+
black==24.10.0
106
# via -r ./lint.in
117
click==8.1.7
128
# via black
@@ -18,13 +14,13 @@ flake8-print==5.0.0
1814
# via -r ./lint.in
1915
mccabe==0.7.0
2016
# via flake8
21-
mypy==1.11.2
17+
mypy==1.13.0
2218
# via -r ./lint.in
2319
mypy-extensions==1.0.0
2420
# via
2521
# black
2622
# mypy
27-
packaging==24.1
23+
packaging==24.2
2824
# via black
2925
pathspec==0.12.1
3026
# via black
@@ -38,9 +34,9 @@ pyflakes==3.2.0
3834
# via
3935
# autoflake
4036
# flake8
41-
ruff==0.6.7
37+
ruff==0.8.3
4238
# via -r ./lint.in
43-
tomli==2.0.1
39+
tomli==2.2.1
4440
# via
4541
# autoflake
4642
# black

requirements/release.txt

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.10
3-
# by the following command:
4-
#
5-
# pip-compile ./release.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile ./release.in --output-file ./release.txt --no-strip-extras --python-version 3.10
73
backports-tarfile==1.2.0
84
# via jaraco-context
9-
certifi==2024.8.30
5+
certifi==2024.12.14
106
# via requests
11-
charset-normalizer==3.3.2
7+
charset-normalizer==3.4.0
128
# via requests
139
docutils==0.21.2
1410
# via readme-renderer
1511
idna==3.10
1612
# via requests
1713
importlib-metadata==8.5.0
18-
# via
19-
# keyring
20-
# twine
14+
# via keyring
2115
jaraco-classes==3.4.0
2216
# via keyring
2317
jaraco-context==6.0.1
2418
# via keyring
25-
jaraco-functools==4.0.2
19+
jaraco-functools==4.1.0
2620
# via keyring
27-
keyring==25.4.1
21+
keyring==25.5.0
2822
# via twine
2923
markdown-it-py==3.0.0
3024
# via rich
@@ -34,9 +28,11 @@ more-itertools==10.5.0
3428
# via
3529
# jaraco-classes
3630
# jaraco-functools
37-
nh3==0.2.18
31+
nh3==0.2.20
3832
# via readme-renderer
39-
pkginfo==1.10.0
33+
packaging==24.2
34+
# via twine
35+
pkginfo==1.12.0
4036
# via twine
4137
pygments==2.18.0
4238
# via
@@ -52,15 +48,17 @@ requests-toolbelt==1.0.0
5248
# via twine
5349
rfc3986==2.0.0
5450
# via twine
55-
rich==13.8.1
51+
rich==13.9.4
5652
# via twine
57-
twine==5.1.1
53+
twine==6.0.1
5854
# via -r ./release.in
55+
typing-extensions==4.12.2
56+
# via rich
5957
urllib3==2.2.3
6058
# via
6159
# requests
6260
# twine
63-
wheel==0.44.0
61+
wheel==0.45.1
6462
# via -r ./release.in
65-
zipp==3.20.2
63+
zipp==3.21.0
6664
# via importlib-metadata

requirements/test.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.10
3-
# by the following command:
4-
#
5-
# pip-compile ./test.in
6-
#
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile ./test.in --output-file ./test.txt --no-strip-extras --python-version 3.10
73
exceptiongroup==1.2.2
84
# via pytest
95
iniconfig==2.0.0
106
# via pytest
11-
packaging==24.1
7+
packaging==24.2
128
# via pytest
139
pluggy==1.5.0
1410
# via pytest
15-
pytest==8.3.3
11+
pytest==8.3.4
1612
# via -r ./test.in
17-
tomli==2.0.1
13+
tomli==2.2.1
1814
# via pytest

requirements/validate.txt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
#
2-
# This file is autogenerated by pip-compile with Python 3.10
3-
# by the following command:
4-
#
5-
# pip-compile ./validate.in
6-
#
7-
certifi==2024.8.30
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile ./validate.in --output-file ./validate.txt --no-strip-extras --python-version 3.10
3+
certifi==2024.12.14
84
# via requests
9-
charset-normalizer==3.3.2
5+
charset-normalizer==3.4.0
106
# via requests
117
click==8.1.7
128
# via -r ./validate.in

scripts/pip-compile.sh

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
#!/usr/bin/env bash
22

3-
pushd ./requirements || exit
4-
5-
find . -type f -name "*.txt" ! -name "constraints.txt" -exec rm '{}' ';'
6-
find . -type f -name "*.in" -maxdepth 1 -exec pip-compile --upgrade '{}' ';'
7-
8-
popd || exit
3+
set -e
94

10-
# Check python version
115
# python version must match lowest supported (3.10)
12-
major=3
13-
minor=10
6+
python_version=${UV_PYTHON_VERSION:-"3.10"}
147

15-
versions=$(cat requirements/* | grep "This file is autogenerated by pip-compile with Python" | awk '{print $NF}' | sort | uniq)
16-
if [[ $(echo $versions | wc -w) -ne 1 ]]; then
17-
echo "Files generated with multiple python version: $versions"
8+
# if major and minor python version (x.y) is not equal to current python_version, error out
9+
if [[ $(python --version | cut -d ' ' -f 2 | cut -d '.' -f 1-2) != $(echo "$python_version" | cut -d '.' -f 1-2) ]]; then
10+
echo "Python version must be $python_version (lowest supported) to be able to pip-compile."
1811
exit 1
1912
fi
2013

21-
version_major=$(echo $versions | awk -F"." '{print $1}')
22-
version_minor=$(echo $versions | awk -F"." '{print $2}')
14+
pushd ./requirements || exit
2315

24-
if [[ $major -ne $version_major || $minor -ne $version_minor ]]; then
25-
echo "python version not equal to expected $major.$minor: $versions"
26-
exit 1
27-
fi
16+
find . -type f -name "*.txt" ! -name "constraints.txt" -exec rm '{}' ';'
17+
find . -type f -name "*.in" -print0 | while read -r -d $'\0' in_file; do
18+
echo "compiling $in_file"
19+
# remove .in extension and add .txt extension
20+
txt_file="${in_file%.in}.txt"
21+
uv pip compile --upgrade "$in_file" --output-file "$txt_file" --no-strip-extras --python-version "$python_version"
22+
done
23+
popd || exit

0 commit comments

Comments
 (0)