File tree Expand file tree Collapse file tree 13 files changed +7898
-2229
lines changed
Expand file tree Collapse file tree 13 files changed +7898
-2229
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup Python and uv'
2+ description : ' Configures a Python version and uv'
3+ inputs :
4+ python-version :
5+ type : string
6+ required : true
7+ runs :
8+ using : " composite"
9+ steps :
10+ - uses : actions/setup-python@v6
11+ with :
12+ python-version : ${{ inputs.python-version }}
13+ - name : Setup Python with UV
14+ uses : astral-sh/setup-uv@v7
15+ with :
16+ python-version : ${{ inputs.python-version }}
17+ enable-cache : " true"
Original file line number Diff line number Diff line change 11name : ' Run tox with environment'
2- description : ' Runs tox with pdm as the package manager'
2+ description : ' Runs tox with uv as the package manager'
33inputs :
44 python-version :
55 type : string
@@ -13,8 +13,8 @@ inputs:
1313runs :
1414 using : " composite"
1515 steps :
16- - name : Setup Python with PDM
17- uses : pdm-project/setup-pdm@v4
16+ - name : Setup Python with UV
17+ uses : ./.github/actions/python-uv
1818 with :
1919 python-version : ${{ inputs.python-version }}
2020 - name : Install system dependencies
@@ -23,11 +23,11 @@ runs:
2323 shell : bash
2424 - name : Install dependencies
2525 run : |
26- pip install tox tox-pdm
26+ uv pip install --system tox tox-uv
2727 shell : bash
2828 - name : Run tox
2929 run : |
30- tox run -e "${{ inputs.tox-env }}" -- ${{ inputs.tox-args }} || ret=$?
30+ tox run --runner uv-venv-lock-runner - e "${{ inputs.tox-env }}" -- ${{ inputs.tox-args }} || ret=$?
3131 # errno 5 means all tests were filtered out, ignore
3232 [[ "${ret:=0}" -eq 5 ]] && exit 0; exit $ret
3333 shell : bash
Original file line number Diff line number Diff line change @@ -29,13 +29,13 @@ jobs:
2929 uses : actions/checkout@v4
3030 with :
3131 fetch-depth : 0
32- - name : Set up Python
33- uses : pdm-project/setup-pdm@v4
32+ - name : Setup Python with UV
33+ uses : ./.github/actions/python-uv
3434 with :
3535 python-version : ${{ matrix.python }}
3636 - name : Install dependencies
3737 run : |
38- pip install tox tox-pdm
38+ uv pip install --system tox tox-pdm
3939 - name : Build the package
4040 run : |
4141 export GUIDELLM_BUILD_TYPE=nightly
Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ jobs:
2828 uses : actions/checkout@v4
2929 with :
3030 fetch-depth : 0
31- - name : Set up Python
32- uses : pdm-project/setup-pdm@v4
31+ - name : Setup Python with UV
32+ uses : ./.github/actions/python-uv
3333 with :
3434 python-version : ${{ matrix.python }}
3535 - name : Install dependencies
3636 run : |
37- pip install tox tox-pdm
37+ uv pip install --system tox tox-pdm
3838 - name : Build the package
3939 run : |
4040 export GUIDELLM_BUILD_TYPE=candidate
Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ jobs:
2727 uses : actions/checkout@v4
2828 with :
2929 fetch-depth : 0
30- - name : Set up Python
31- uses : pdm-project/setup-pdm@v4
30+ - name : Setup Python with UV
31+ uses : ./.github/actions/python-uv
3232 with :
3333 python-version : ${{ matrix.python }}
3434 - name : Install dependencies
3535 run : |
36- pip install tox tox-pdm
36+ uv pip install --system tox tox-pdm
3737 - name : Build the package
3838 run : |
3939 export GUIDELLM_BUILD_TYPE=release
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ ipython_config.py
9595# pyenv
9696# For a library or package, you might want to ignore these files since the code is
9797# intended to run in multiple environments; otherwise, check them in:
98- # .python-version
98+ .python-version
9999
100100# pipenv
101101# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Original file line number Diff line number Diff line change 66 exclude : ^tests/?.*/assets/.+
77 - id : end-of-file-fixer
88 exclude : ^tests/?.*/assets/.+
9- - repo : https://github.com/pdm-project/pdm
10- rev : 2.25.6
9+ - repo : https://github.com/astral-sh/uv-pre-commit
10+ rev : 0.9.15
1111 hooks :
12- - id : pdm-lock-check
13- name : check lock file matches pyproject
14- entry : sh -c "pdm lock -v --check || pdm lock --update-reuse"
12+ - id : uv-lock
13+ name : check uv.lock file matches pyproject
14+ - id : uv-export
15+ name : Update pylock to match uv.lock
16+ # NOTE: Arguments should match ./scripts/generate_pylock.sh
17+ args :
18+ - " --frozen"
19+ - " --all-groups"
20+ - " --all-extras"
21+ - " --format=pylock.toml"
22+ - " --output-file=pylock.toml"
23+ - " --quiet"
1524- repo : https://github.com/astral-sh/ruff-pre-commit
1625 rev : v0.11.7
1726 hooks :
Original file line number Diff line number Diff line change @@ -15,22 +15,23 @@ USER root
1515
1616# Install build tooling
1717RUN dnf install -y git \
18- && /usr/bin/python3 -m venv /tmp/pdm \
19- && /tmp/pdm /bin/pip install --no-cache-dir -U pdm \
20- && ln -s /tmp/pdm /bin/pdm /usr/local/bin/pdm
18+ && /usr/bin/python3 -m venv /tmp/uv \
19+ && /tmp/uv /bin/pip install --no-cache-dir -U uv \
20+ && ln -s /tmp/uv /bin/uv /usr/local/bin/uv
2121
22- # Disable pdm update check
22+ # Set the default venv for uv
23+ # Copy instead of link files with uv
2324# Set correct build type for versioning
24- ENV PDM_CHECK_UPDATE=false \
25+ ENV VIRTUAL_ENV=/opt/app-root \
26+ UV_LINK_MODE="copy" \
2527 GUIDELLM_BUILD_TYPE=$GUIDELLM_BUILD_TYPE
2628
2729# Copy repository files
2830# Do this as late as possible to leverage layer caching
2931COPY / /src
3032
3133# Install guidellm and locked dependencies
32- RUN pdm use -p /src -f /opt/app-root \
33- && pdm install -p /src -G all --check --prod --no-editable
34+ RUN uv sync --active --project /src --frozen --no-dev --extra all --no-editable
3435
3536# Prod image
3637FROM $BASE_IMAGE
You can’t perform that action at this time.
0 commit comments