File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,14 +46,17 @@ jobs:
4646 - name : Checkout
4747 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4848
49- - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
49+ - name : Setup Python and uv
50+ uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
5051 with :
5152 python-version : " 3.11"
5253
5354 - name : Install requirements
55+ env :
56+ UV_EXCLUDE_NEWER : P3D # reject packages uploaded within the last 3 days (supply chain protection)
5457 run : |
55- pip install --upgrade pip
56- pip install -r requirements.txt
58+ uv venv
59+ uv pip install -r requirements.txt
5760
5861 - name : Generate file to upload
5962 id : file-generator
6265 METADATA_FILE="$(basename ${{ matrix.file }} .ipynb).yml"
6366 echo "file=text/$FILE" >> "$GITHUB_OUTPUT"
6467 echo "metadata_file=text/$METADATA_FILE" >> "$GITHUB_OUTPUT"
68+ . .venv/bin/activate
6569 python scripts/generate_txt.py --metadata --notebooks ${{ matrix.file }}
6670
6771 - name : Upload tutorial to deepset Cloud
Original file line number Diff line number Diff line change @@ -10,20 +10,27 @@ jobs:
1010 - name : Checkout
1111 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1212
13- - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
13+ - name : Setup Python and uv
14+ uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
1415 with :
1516 python-version : " 3.11"
1617
1718 - name : Install requirements
19+ env :
20+ UV_EXCLUDE_NEWER : P3D # reject packages uploaded within the last 3 days (supply chain protection)
1821 run : |
19- pip install --upgrade pip
20- pip install -r requirements.txt
22+ uv venv
23+ uv pip install -r requirements.txt
2124
2225 - name : Generate all tutorials and their metadata
23- run : python scripts/generate_txt.py --notebooks all --metadata
26+ run : |
27+ . .venv/bin/activate
28+ python scripts/generate_txt.py --notebooks all --metadata
2429
2530 - name : Full sync
2631 env :
2732 DEEPSET_CLOUD_WORKSPACE : ${{ secrets.DEEPSET_CLOUD_WORKSPACE }}
2833 DEEPSET_CLOUD_API_KEY : ${{ secrets.DEEPSET_CLOUD_API_KEY }}
29- run : python scripts/full_dc_sync.py
34+ run : |
35+ . .venv/bin/activate
36+ python scripts/full_dc_sync.py
Original file line number Diff line number Diff line change @@ -97,10 +97,12 @@ jobs:
9797 VERSION="${{ matrix.haystack_version }}"
9898 uv pip install "haystack-ai==${VERSION#v}"
9999 fi
100- uv pip install nbconvert ipython
100+ uv pip install --exclude-newer P3D nbconvert ipython # P3D = 3-day cutoff; haystack-ai above is exempt
101101
102102 - name : Install tutorial dependencies
103103 if : toJSON(matrix.dependencies) != '[]'
104+ env :
105+ UV_EXCLUDE_NEWER : P3D # reject packages uploaded within the last 3 days (supply chain protection)
104106 run : |
105107 uv pip install "${{ join(matrix.dependencies, '" "')}}"
106108
Original file line number Diff line number Diff line change 1919 python-version : " 3.11"
2020
2121 - name : Install dependencies
22+ env :
23+ UV_EXCLUDE_NEWER : P3D # reject packages uploaded within the last 3 days (supply chain protection)
2224 run : |
2325 uv venv
2426 uv pip install -r requirements.txt
You can’t perform that action at this time.
0 commit comments