Skip to content

Commit c3d577d

Browse files
committed
ci: simplify lockstep release tooling
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
1 parent 165c933 commit c3d577d

7 files changed

Lines changed: 9 additions & 69 deletions

File tree

.github/scripts/build-packages.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ set -x # display command on output
77
# can upload them independently (a single `dist/` makes the second publish step
88
# re-upload the first package's files and fail on `skip-existing: false`).
99

10-
python3 .github/scripts/check_lockstep.py
11-
1210
echo "Building docling-core package..."
1311
uv build --package docling-core --out-dir dist/docling-core
1412

.github/scripts/check_lockstep.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/scripts/release.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ CHGLOG_FILE="${CHGLOG_FILE:-CHANGELOG.md}"
1212
# update package versions:
1313
# - root pyproject.toml = docling-core
1414
# - packages/dlgrep/pyproject.toml = dlgrep (lockstep, incl. its docling-core== pin)
15-
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version "${TARGET_VERSION}"
16-
uvx --from=toml-cli toml set --toml-path=packages/dlgrep/pyproject.toml project.version "${TARGET_VERSION}"
17-
sed -i.bak -E "s/\"docling-core==[0-9][^\"]*\"/\"docling-core==${TARGET_VERSION}\"/" packages/dlgrep/pyproject.toml
18-
rm -f packages/dlgrep/pyproject.toml.bak
19-
python3 .github/scripts/check_lockstep.py
15+
uv version "${TARGET_VERSION}" --package docling-core --frozen
16+
uv version "${TARGET_VERSION}" --package dlgrep --frozen
17+
uv add "docling-core==${TARGET_VERSION}" --package dlgrep --frozen
2018

2119
uv lock --upgrade-package docling-core --upgrade-package dlgrep
2220

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
enable-cache: true
2727
- name: Install dependencies
28-
run: uv sync --only-dev
28+
run: uv sync --frozen --only-dev
2929
- name: Check version of potential release
3030
id: version_check
3131
run: |
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
enable-cache: true
5757
- name: Install dependencies
58-
run: uv sync --only-dev
58+
run: uv sync --frozen --only-dev
5959
- name: Run release script
6060
env:
6161
GH_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
python-version: ${{ matrix.python-version }}
6262
enable-cache: true
6363
- name: Install dependencies
64-
run: uv sync --all-extras --all-packages
64+
run: uv sync --frozen --all-extras --all-packages
6565
- name: Build packages
6666
run: bash .github/scripts/build-packages.sh
6767
- name: Check content of wheels

.github/workflows/pypi.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
enable-cache: true
2323
- name: Install dependencies
24-
run: uv sync --all-extras --all-packages
24+
run: uv sync --frozen --all-extras --all-packages
2525
- name: Build packages
2626
run: bash .github/scripts/build-packages.sh
2727
# Last gate before anything is public. Installing both wheels in one
@@ -62,13 +62,11 @@ jobs:
6262
packages-dir: dist/docling-core/
6363

6464
publish-dlgrep:
65-
# dlgrep pins docling-core exactly, so publish it second. No propagation
66-
# wait: at worst an install in the seconds between the two uploads has to
67-
# be retried - not a reason to hold up a release.
65+
# dlgrep pins docling-core exactly, so publish it second.
6866
needs: publish-docling-core
6967
runs-on: ubuntu-latest
7068
environment:
71-
name: pypi-dlgrep
69+
name: pypi
7270
url: https://pypi.org/p/dlgrep
7371
permissions:
7472
id-token: write # IMPORTANT: mandatory for trusted publishing

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ repos:
3535
pass_filenames: false
3636
language: system
3737
files: '\.py$'
38-
- id: lockstep-version
39-
name: "dlgrep/docling-core version lockstep"
40-
entry: uv run --no-sync python .github/scripts/check_lockstep.py
41-
pass_filenames: false
42-
language: system
43-
files: 'pyproject\.toml$'
4438
- repo: local
4539
hooks:
4640
- id: docs

0 commit comments

Comments
 (0)