Skip to content

chore: switch to uv #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3be3af8
switch from poetry to uv
rmdg88 Jun 13, 2025
bfa7bff
switch from poetry to uv
rmdg88 Jun 13, 2025
03020cb
switch from poetry to uv
rmdg88 Jun 13, 2025
02f9170
switch from poetry to uv
rmdg88 Jun 13, 2025
e016cf9
switch from poetry to uv
rmdg88 Jun 16, 2025
16e8307
switch from poetry to uv
rmdg88 Jun 16, 2025
ce0078f
switch from poetry to uv
rmdg88 Jun 16, 2025
ddc53d6
switch from poetry to uv
rmdg88 Jun 16, 2025
ae09944
switch from poetry to uv
rmdg88 Jun 16, 2025
b2b38c1
switch from poetry to uv
rmdg88 Jun 16, 2025
b0f5a52
switch from poetry to uv
rmdg88 Jun 16, 2025
fbe306d
switch from poetry to uv
rmdg88 Jun 16, 2025
9d8beec
switch from poetry to uv
rmdg88 Jun 17, 2025
1c6ad89
switch from poetry to uv
rmdg88 Jun 17, 2025
1e4d805
switch from poetry to uv
rmdg88 Jun 17, 2025
deeeb29
switch from poetry to uv
rmdg88 Jun 17, 2025
ac647d2
switch from poetry to uv
rmdg88 Jun 17, 2025
42ded15
switch from poetry to uv
rmdg88 Jun 17, 2025
0c1993e
switch from poetry to uv
rmdg88 Jun 17, 2025
5e30ac9
switch from poetry to uv
rmdg88 Jun 17, 2025
24bff78
switch from poetry to uv
rmdg88 Jun 17, 2025
bee6db1
switch from poetry to uv
rmdg88 Jun 17, 2025
6cde8e2
switch from poetry to uv
rmdg88 Jun 17, 2025
1c24fab
switch from poetry to uv
rmdg88 Jun 17, 2025
d960ca1
switch from poetry to uv
rmdg88 Jun 17, 2025
599114d
switch from poetry to uv
rmdg88 Jun 18, 2025
157bb45
switch from poetry to uv
rmdg88 Jun 18, 2025
c811fce
switch from poetry to uv
rmdg88 Jun 18, 2025
05d2c85
switch from poetry to uv
rmdg88 Jun 18, 2025
094917f
switch from poetry to uv
rmdg88 Jun 18, 2025
d192a85
DCO Remediation Commit for rmdg88 <[email protected]>
rmdg88 Jun 18, 2025
cf27197
Merge branch 'main' into rui/uv
rmdg88 Jun 18, 2025
2b90e92
switch from poetry to uv
rmdg88 Jun 18, 2025
03c545c
rmdg88 <[email protected]>
rmdg88 Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/actions/setup-poetry/action.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/scripts/build_rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -e # trigger failure on error - do not remove!
set -x # display command on output

# Build the Python package with Poetry
poetry build -f sdist
# Build the Python package with uv
uv build --sdist

sudo -E XDG_RUNTIME_DIR= podman build --progress=plain \
--build-arg USE_SYSTEM_DEPS="$USE_SYSTEM_DEPS" \
Expand Down Expand Up @@ -35,7 +35,8 @@ sudo -E XDG_RUNTIME_DIR= podman build --progress=plain \
# pre-install build requirements + wheel for "--no-build-isolation"
# build docling-parse wheel in an isolated network namespace (unshare -rn)
# install the wheel and its dependencies
RUN pip3.11 install poetry-core pybind11 wheel \
RUN pip3.11 install --upgrade pip \
&& pip3.11 install --upgrade --ignore-installed "setuptools>=77.0.3" "wheel>=0.43.0,<1.0.0" "pybind11>=2.13.6" \
&& unshare -rn pip3.11 wheel \
--no-deps --no-build-isolation -w /dist/ \
/src/docling_parse*.tar.gz \
Expand All @@ -46,4 +47,4 @@ sudo -E XDG_RUNTIME_DIR= podman build --progress=plain \

RUN pip3.11 install pytest \
&& pytest
EOF
EOF
4 changes: 2 additions & 2 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ fi
CHGLOG_FILE="${CHGLOG_FILE:-CHANGELOG.md}"

# update package version
poetry version "${TARGET_VERSION}"
uv version "${TARGET_VERSION}"

# collect release notes
REL_NOTES=$(mktemp)
poetry run semantic-release changelog --unreleased >> "${REL_NOTES}"
uv run semantic-release changelog --unreleased >> "${REL_NOTES}"

# update changelog
TMP_CHGLOG=$(mktemp)
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,28 @@ jobs:
code-checks:
uses: ./.github/workflows/checks.yml
pre-release-check:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
outputs:
TARGET_TAG_V: ${{ steps.version_check.outputs.TRGT_VERSION }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # for fetching tags, required for semantic-release
- uses: ./.github/actions/setup-poetry
- name: Install uv and set the python version
uses: ./.astral-sh/setup-uv@v5
- name: Check version of potential release
id: version_check
run: |
TRGT_VERSION=$(poetry run semantic-release print-version)
TRGT_VERSION=$(uv run semantic-release print-version)
echo "TRGT_VERSION=${TRGT_VERSION}" >> $GITHUB_OUTPUT
echo "${TRGT_VERSION}"
- name: Check notes of potential release
run: poetry run semantic-release changelog --unreleased
run: uv run semantic-release changelog --unreleased
release:
needs: [code-checks, pre-release-check]
if: needs.pre-release-check.outputs.TARGET_TAG_V != ''
environment: auto-release
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency: release
steps:
- uses: actions/create-github-app-token@v1
Expand All @@ -43,7 +44,8 @@ jobs:
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0 # for fetching tags, required for semantic-release
- uses: ./.github/actions/setup-poetry
- name: Install uv and set the python version
uses: ./.astral-sh/setup-uv@v5
- name: Run release script
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ env:

jobs:
run-checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run styling check
run: poetry run pre-commit run --all-files
- name: Install with poetry
- name: Sync and install with uv
run: |
poetry install --all-extras
uv sync --frozen --all-extras
ls -l
ls -l docling_parse
- name: Run styling check
run: |
uv run pre-commit run --all-files
- name: Testing
run: |
poetry run pytest -v tests
- name: Build with poetry
run: poetry build
uv run pytest -v tests
- name: Build with uv
run: uv build
20 changes: 18 additions & 2 deletions .github/workflows/rhel.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
on:
workflow_call:

# jobs:
# run-checks:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install uv and python
# uses: astral-sh/setup-uv@v5
# - name: Install podman
# run: sudo apt-get update && sudo apt-get install -y podman
# - name: Run build in docker
# run: ./.github/scripts/build_rhel.sh
# shell: bash

jobs:
run-checks:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-poetry
- name: Setup uv with python 3.11
uses: astral-sh/setup-uv@v5
with:
python-version: 3.11
- name: Install podman
run: sudo apt-get update && sudo apt-get install -y podman
- name: Run build in docker
Expand Down
Loading
Loading