Skip to content

Commit af90f1f

Browse files
committed
Change the scripts so that it runs with uv
1 parent e98a63e commit af90f1f

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

.github/workflows/piplock-renewal.yaml renamed to .github/workflows/uvlock-renewal.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# This GitHub action is meant to update the pipfile.locks
3-
name: Pipfile.locks Renewal Action
3+
name: uv.locks Renewal Action
44

55
on: # yamllint disable-line rule:truthy
66
# Triggers the workflow every Wednesday at 1am UTC
@@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy
1313
required: false
1414
default: 'main'
1515
python_version:
16-
description: 'Select Python version to update Pipfile.lock'
16+
description: 'Select Python version to update uv.lock'
1717
required: false
1818
default: '3.11'
1919
type: choice
@@ -59,14 +59,14 @@ jobs:
5959
with:
6060
python-version: ${{ env.PYTHON_VERSION }}
6161

62-
# Install pipenv
63-
- name: Install pipenv
64-
run: pip install pipenv
62+
# Install uv
63+
- name: Install uv
64+
run: pip install uv
6565

66-
# Run makefile recipe to refresh Pipfile.lock and push changes back to the branch
66+
# Run makefile recipe to refresh uv.lock and push changes back to the branch
6767
- name: Run make refresh-pipfilelock-files and push the changes back to the branch
6868
run: |
69-
make refresh-pipfilelock-files PYTHON_VERSION=${{ env.PYTHON_VERSION }} INCLUDE_OPT_DIRS=${{ env.INCLUDE_OPT_DIRS }}
70-
git add .
71-
git commit -m "Update Pipfile.lock files by piplock-renewal.yaml action"
69+
uv lock --python ${{ env.PYTHON_VERSION }}
70+
git add uv.lock
71+
git commit -m "Update uv.lock files by uvlock-renewal.yaml action"
7272
git push origin ${{ env.BRANCH }}

scripts/sync-requirements-txt.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@ set -Eeuxo pipefail
55
# Namely, Konflux (https://konflux-ci.dev/), and Cachi2 (https://github.com/containerbuildsystem/cachi2).
66

77
# The following will create an extra requirement.txt file for every Pipfile.lock we have.
8-
micropipenv --version || pip install micropipenv
9-
find . -name Pipfile.lock -execdir bash -c '
10-
echo "# Generated by /scripts/sync-requirements-txt.sh from Pipfile.lock" > requirements.txt &&
11-
echo >> requirements.txt &&
12-
micropipenv requirements >> requirements.txt' \;
8+
uv --version || pip install uv
9+
cd jupyter
10+
find . -name requirements.txt -execdir bash -c '
11+
full_path=$(pwd)
12+
13+
echo "# Generated by /scripts/sync-requirements-txt.sh from uv.lock" > requirements.txt
14+
echo >> requirements.txt
15+
16+
temp_dir="${full_path%/*}"
17+
image_name="${temp_dir##*/}"
18+
19+
if [[ "$full_path" == *"/rocm/"* ]]; then
20+
image_name="${image_name}-rocm"
21+
fi
22+
23+
uv export --format requirements-txt --group jupyter-${image_name}-image >> requirements.txt' \;

0 commit comments

Comments
 (0)