Skip to content

Commit e960161

Browse files
authored
feat/migrate uv (#454)
* update all deps to use uv * bump version * update CI * fixing CI * tidy shell * expand support to 3.9 * fixing CI * fixing CI * fixing CI * fixing CI * isolate pandas dep * fix unit tests * fixing CI * fixing CI * fixing CI * fixing CI * fixing CI * fixing CI * fixing CI * fixing CI * update pinecone * update pinecone * update pinecone * fixing CI * fixing CI * fixing CI * expose timeout in client * fixing CI * omit some files from api tests * omit by_similarity from chunking int tests * fixing CI * set pytest timeout * update confluence fixtures
1 parent a368082 commit e960161

File tree

244 files changed

+9209
-7056
lines changed

Some content is hidden

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

244 files changed

+9209
-7056
lines changed

.github/actions/base-cache/action.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Generate Cache Key"
2+
description: "Generates a cache key based on use-uv setting"
3+
inputs:
4+
python-version:
5+
description: "Python version"
6+
required: false
7+
default: "3.12.6"
8+
outputs:
9+
cache-key:
10+
description: "Computed cache key"
11+
value: ${{ steps.compute-key.outputs.key }}
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Compute cache key
16+
id: compute-key
17+
shell: bash
18+
run: |
19+
lockfile_hash=$(sha256sum uv.lock | cut -d ' ' -f 1)
20+
cache_key="venv-uv-${{ runner.os }}-${{ inputs.python-version }}-${lockfile_hash}"
21+
echo "key=${cache_key}" >> "$GITHUB_OUTPUT"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "Setup Environment"
2+
description: "Sets up the environment for running the tests"
3+
4+
inputs:
5+
python-version:
6+
description: "Python version"
7+
default: "3.10"
8+
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Generate Cache Key
17+
id: cache-key
18+
uses: ./.github/actions/generate-cache-key
19+
with:
20+
python-version: ${{ inputs.python-version }}
21+
22+
- name: Restore Virtual Environment Cache
23+
id: cache-restore
24+
uses: actions/cache@v4
25+
with:
26+
key: ${{ steps.cache-key.outputs.cache-key }}
27+
path: ${{ inputs.work-dir }}/.venv
28+
29+
- name: Set up Python environment
30+
uses: ./.github/actions/setup-python
31+
with:
32+
python-version: ${{ inputs.python-version }}
33+
34+
35+
# Don't install all the local partitioning deps
36+
- name: Install dependencies
37+
shell: bash
38+
run: |
39+
uv sync --frozen --all-extras --all-groups \
40+
--no-extra doc \
41+
--no-extra docx \
42+
--no-extra epub \
43+
--no-extra image \
44+
--no-extra md \
45+
--no-extra msg \
46+
--no-extra odt \
47+
--no-extra org \
48+
--no-extra pdf \
49+
--no-extra ppt \
50+
--no-extra pptx \
51+
--no-extra rst \
52+
--no-extra rtf \
53+
--no-extra tsv \
54+
--no-extra xlsx
55+
56+
- name: Cache Virtual Environment (Final)
57+
uses: actions/cache@v4
58+
with:
59+
key: ${{ steps.cache-key.outputs.cache-key }}
60+
path: ${{ inputs.work-dir }}/.venv
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Setup Python Environment"
2+
description: "Installs Python and sets up a virtual environment"
3+
inputs:
4+
5+
python-version:
6+
description: "Python version"
7+
required: false
8+
default: "3.12.6"
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v5
14+
with:
15+
python-version: ${{ matrix.python-version }}
16+
17+
- name: Set up Python
18+
shell: bash
19+
run: uv python install
20+
21+
- name: Create Virtual Environment (if missing)
22+
shell: bash
23+
working-directory: ${{ inputs.work-dir }}
24+
run: |
25+
if [ ! -d ".venv" ]; then
26+
uv venv
27+
echo "./.venv/bin" >> $GITHUB_PATH
28+
echo "VIRTUAL_ENV=./.venv" >> $GITHUB_ENV
29+
fi

0 commit comments

Comments
 (0)