Skip to content

Commit a4c87c1

Browse files
committed
Bump Python to 3.11, rebuild deps, revert CI changes
1 parent d7f339f commit a4c87c1

File tree

7 files changed

+204
-200
lines changed

7 files changed

+204
-200
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88

99
env:
10-
PYTHON_VERSION: "3.10"
10+
PYTHON_VERSION: "3.12"
1111
PIPELINE_FAMILY: "general"
1212

1313
jobs:
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
path: |
2222
.venv
23-
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt', 'requirements/test.txt') }}
23+
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/*.txt') }}
2424
- name: Set up Python ${{ env.PYTHON_VERSION }}
2525
uses: actions/setup-python@v5
2626
with:
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
path: |
4444
.venv
45-
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt', 'requirements/test.txt') }}
45+
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/*.txt') }}
4646
- name: Lint
4747
run: |
4848
source .venv/bin/activate
@@ -65,11 +65,13 @@ jobs:
6565
with:
6666
path: |
6767
.venv
68-
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt', 'requirements/test.txt') }}
68+
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }}
6969
- name: Run core tests
7070
run: |
71+
python${{ env.PYTHON_VERSION }} -m venv .venv
7172
source .venv/bin/activate
7273
sudo apt-get update && sudo apt-get install --yes poppler-utils libreoffice
74+
make install-test
7375
make install-pandoc
7476
sudo add-apt-repository -y ppa:alex-p/tesseract-ocr5
7577
sudo apt-get install -y tesseract-ocr tesseract-ocr-kor
@@ -105,10 +107,12 @@ jobs:
105107
with:
106108
path: |
107109
.venv
108-
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/base.txt', 'requirements/test.txt') }}
110+
key: ci-venv-${{ env.PIPELINE_FAMILY }}-${{ hashFiles('requirements/test.txt') }}
109111
- name: Test Dockerfile
110112
run: |
113+
python${{ env.PYTHON_VERSION }} -m venv .venv
111114
source .venv/bin/activate
115+
make install-test
112116
make docker-build
113117
make docker-test
114118
# - name: Scan image

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
PACKAGE: "unstructured-api"
1212
PIPELINE_FAMILY: "general"
1313
PIP_VERSION: "25.1.1"
14-
PYTHON_VERSION: "3.10"
14+
PYTHON_VERSION: "3.12"
1515

1616
jobs:
1717
setup:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,13 @@ curl -X 'POST'
289289
* Using `pyenv` to manage virtualenv's is recommended
290290
* Mac install instructions. See [here](https://github.com/Unstructured-IO/community#mac--homebrew) for more detailed instructions.
291291
* `brew install pyenv-virtualenv`
292-
* `pyenv install 3.10.12`
292+
* `pyenv install 3.12`
293293
* Linux instructions are available [here](https://github.com/Unstructured-IO/community#linux).
294294

295295
* Create a virtualenv to work in and activate it, e.g. for one named `document-processing`:
296296

297-
`pyenv virtualenv 3.10.12 unstructured-api` <br />
297+
`pyenv virtualenv 3.12
298+
unstructured-api` <br />
298299
`pyenv activate unstructured-api`
299300

300301
See the [Unstructured Quick Start](https://github.com/Unstructured-IO/unstructured#eight_pointed_black_star-quick-start) for the many OS dependencies that are required, if the ability to process all file types is desired.

requirements/base.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
-c constraints.in
22
unstructured[all-docs]
3-
# Pinning click due to a unicode issue in black
4-
# can remove after black drops support for Python 3.6
5-
# ref: https://github.com/psf/black/issues/2964
6-
click==8.2.1
3+
click
74
fastapi
85
uvicorn
96
ratelimit

0 commit comments

Comments
 (0)