Skip to content

Commit bbd4389

Browse files
committed
Merge branch 'v1.4-andium'
2 parents df7789c + 2cbb98d commit bbd4389

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+340
-295
lines changed

.github/workflows/cleanup_pypi.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
description: CI environment to run in (pypi-test or pypi-prod-nightly)
77
type: string
88
required: true
9+
subcommand:
10+
description: List or Delete
11+
type: string
12+
default: delete
13+
verbosity:
14+
description: Tool verbosity ("verbose" or "debug")
15+
type: string
16+
default: verbose
917
secrets:
1018
PYPI_CLEANUP_OTP:
1119
description: PyPI OTP
@@ -15,17 +23,29 @@ on:
1523
required: true
1624
workflow_dispatch:
1725
inputs:
18-
dry-run:
19-
description: List packages that would be deleted but don't delete them
20-
type: boolean
21-
default: false
26+
subcommand:
27+
description: List or Delete
28+
type: choice
29+
required: true
30+
options:
31+
- list
32+
- delete
33+
default: list
2234
environment:
2335
description: CI environment to run in
2436
type: choice
2537
required: true
2638
options:
2739
- pypi-prod-nightly
2840
- pypi-test
41+
verbosity:
42+
description: Tool verbosity
43+
type: choice
44+
required: true
45+
options:
46+
- verbose
47+
- debug
48+
default: verbose
2949

3050
jobs:
3151
cleanup_pypi:
@@ -50,26 +70,41 @@ jobs:
5070
exit 1
5171
5272
- name: Install Astral UV
53-
uses: astral-sh/setup-uv@v6
73+
uses: astral-sh/setup-uv@v7
5474
with:
55-
version: "0.8.16"
75+
version: "0.9.0"
76+
77+
- name: Install dependencies
78+
run: uv sync --only-group pypi --no-install-project
79+
80+
- name: List Stale Packages on PyPI
81+
if: inputs.subcommand == 'list'
82+
env:
83+
PYTHON_UNBUFFERED: 1
84+
run: |
85+
set -x
86+
uv run --no-sync python -u -m duckdb_packaging.pypi_cleanup \
87+
--${{ inputs.environment == 'pypi-prod-nightly' && 'prod' || 'test' }} \
88+
--max-nightlies ${{ vars.PYPI_MAX_NIGHTLIES }} \
89+
--${{ inputs.verbosity }} \
90+
list 2>&1 | tee cleanup_output
5691
57-
- name: Run Cleanup
92+
- name: Delete Stale Packages from PyPI
93+
if: inputs.subcommand == 'delete'
5894
env:
5995
PYTHON_UNBUFFERED: 1
6096
run: |
6197
set -x
62-
uv sync --only-group pypi --no-install-project
63-
uv run --no-sync python -u -m duckdb_packaging.pypi_cleanup ${{ inputs.dry-run && '--dry' || '' }} \
64-
${{ inputs.environment == 'pypi-prod-nightly' && '--prod' || '--test' }} \
65-
--verbose \
66-
--username "${{ vars.PYPI_CLEANUP_USERNAME }}" \
67-
--max-nightlies ${{ vars.PYPI_MAX_NIGHTLIES }} 2>&1 | tee cleanup_output
98+
uv run --no-sync python -u -m duckdb_packaging.pypi_cleanup \
99+
--${{ inputs.environment == 'pypi-prod-nightly' && 'prod' || 'test' }} \
100+
--max-nightlies ${{ vars.PYPI_MAX_NIGHTLIES }} \
101+
--${{ inputs.verbosity }} \
102+
delete --username "${{ vars.PYPI_CLEANUP_USERNAME }}" 2>&1 | tee cleanup_output
68103
69104
- name: PyPI Cleanup Summary
70105
run : |
71106
echo "## PyPI Cleanup Summary" >> $GITHUB_STEP_SUMMARY
72-
echo "* Dry run: ${{ inputs.dry-run }}" >> $GITHUB_STEP_SUMMARY
107+
echo "* Subcommand: ${{ inputs.subcommand }}" >> $GITHUB_STEP_SUMMARY
73108
echo "* CI Environment: ${{ inputs.environment }}" >> $GITHUB_STEP_SUMMARY
74109
echo "* Output:" >> $GITHUB_STEP_SUMMARY
75110
echo '```' >> $GITHUB_STEP_SUMMARY

.github/workflows/code_quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: Install Astral UV
32-
uses: astral-sh/setup-uv@v6
32+
uses: astral-sh/setup-uv@v7
3333
with:
34-
version: "0.7.14"
34+
version: "0.9.0"
3535
python-version: 3.9
3636

3737
- name: pre-commit (cache)

.github/workflows/coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ jobs:
6868
sudo apt-get -y install ccache
6969
7070
- name: Install Astral UV and enable the cache
71-
uses: astral-sh/setup-uv@v6
71+
uses: astral-sh/setup-uv@v7
7272
with:
73-
version: "0.8.16"
73+
version: "0.9.0"
7474
python-version: 3.9
7575
enable-cache: true
7676
cache-suffix: -${{ github.workflow }}
@@ -79,7 +79,7 @@ jobs:
7979
shell: bash
8080
run: |
8181
if [[ "${{ inputs.testsuite }}" == "all" ]]; then
82-
uv run coverage run -m pytest ./tests --ignore=./tests/stubs
82+
uv run coverage run -m pytest ./tests
8383
elif [[ "${{ inputs.testsuite }}" == "fast" ]]; then
8484
uv run coverage run -m pytest ./tests/fast
8585
else

.github/workflows/packaging_sdist.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
run: echo "OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV
5757

5858
- name: Install Astral UV
59-
uses: astral-sh/setup-uv@v6
59+
uses: astral-sh/setup-uv@v7
6060
with:
61-
version: "0.8.16"
61+
version: "0.9.0"
6262
python-version: 3.11
6363

6464
- name: Build sdist
@@ -80,7 +80,7 @@ jobs:
8080
# run tests
8181
tests_root="${{ github.workspace }}/tests"
8282
tests_dir="${tests_root}${{ inputs.testsuite == 'fast' && '/fast' || '/' }}"
83-
uv run --verbose pytest $tests_dir --verbose --ignore=${tests_root}/stubs
83+
uv run --verbose pytest -c ${{ github.workspace }}/pyproject.toml $tests_dir
8484
8585
- id: versioning
8686
run: |

.github/workflows/packaging_wheels.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,29 @@ jobs:
4444
- { minimal: true, python: cp310 }
4545
- { minimal: true, python: cp311 }
4646
- { minimal: true, python: cp312 }
47+
- { minimal: true, python: cp313 }
4748
- { minimal: true, platform: { arch: universal2 } }
4849
runs-on: ${{ matrix.platform.os }}
4950
env:
51+
### cibuildwheel configuration
52+
#
53+
# This is somewhat brittle, so be careful with changes. Some notes for our future selves (and others):
54+
# - cibw will change its cwd to a temp dir and create a separate venv for testing. It then installs the wheel it
55+
# built into that venv, and run the CIBW_TEST_COMMAND. We have to install all dependencies ourselves, and make
56+
# sure that the pytest config in pyproject.toml is available.
57+
# - CIBW_BEFORE_TEST installs the test dependencies by exporting them into a pylock.toml. At the time of writing,
58+
# `uv sync --no-install-project` had problems correctly resolving dependencies using resolution environments
59+
# across all platforms we build for. This might be solved in newer uv versions.
60+
# - CIBW_TEST_COMMAND specifies pytest conf from pyproject.toml. --confcutdir is needed to prevent pytest from
61+
# traversing the full filesystem, which produces an error on Windows.
62+
# - CIBW_TEST_SKIP we always skip tests for *-macosx_universal2 builds, because we run tests for arm64 and x86_64.
5063
CIBW_TEST_SKIP: ${{ inputs.testsuite == 'none' && '*' || '*-macosx_universal2' }}
5164
CIBW_TEST_SOURCES: tests
5265
CIBW_BEFORE_TEST: >
53-
uv export --only-group test --no-emit-project --output-file pylock.toml --directory {project} &&
66+
uv export --only-group test --no-emit-project --quiet --output-file pylock.toml --directory {project} &&
5467
uv pip install -r pylock.toml
5568
CIBW_TEST_COMMAND: >
56-
uv run -v pytest ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }} --verbose --ignore=./tests/stubs
69+
uv run -v pytest --confcutdir=. --rootdir . -c {project}/pyproject.toml ${{ inputs.testsuite == 'fast' && './tests/fast' || './tests' }}
5770
5871
steps:
5972
- name: Checkout DuckDB Python
@@ -78,15 +91,14 @@ jobs:
7891
run: echo "CIBW_ENVIRONMENT=OVERRIDE_GIT_DESCRIBE=${{ inputs.set-version }}" >> $GITHUB_ENV
7992

8093
# Install Astral UV, which will be used as build-frontend for cibuildwheel
81-
- uses: astral-sh/setup-uv@v6
94+
- uses: astral-sh/setup-uv@v7
8295
with:
83-
version: "0.8.16"
96+
version: "0.9.0"
8497
enable-cache: false
8598
cache-suffix: -${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}
86-
python-version: ${{ matrix.python }}
8799

88100
- name: Build${{ inputs.testsuite != 'none' && ' and test ' || ' ' }}wheels
89-
uses: pypa/cibuildwheel@v3.1
101+
uses: pypa/cibuildwheel@v3.2
90102
env:
91103
CIBW_ARCHS: ${{ matrix.platform.arch == 'amd64' && 'AMD64' || matrix.platform.arch }}
92104
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.platform.cibw_system }}_${{ matrix.platform.arch }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
rev: v1.18.2
3535
hooks:
3636
- id: mypy
37-
entry: mypy -v
37+
entry: mypy
3838
files: ^(duckdb/|_duckdb-stubs/)
3939
exclude: ^duckdb/(experimental|query_graph)/
4040
additional_dependencies: [ numpy, polars ]

cmake/compiler_launcher.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ include(CMakeParseArguments)
88
# Function to look for ccache and sccache to speed up builds, if available
99
# ────────────────────────────────────────────
1010
function(setup_compiler_launcher_if_available)
11-
if(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER AND NOT DEFINED
12-
ENV{CMAKE_C_COMPILER_LAUNCHER})
11+
if(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER)
1312
find_program(COMPILER_LAUNCHER NAMES ccache sccache)
1413
if(COMPILER_LAUNCHER)
1514
message(STATUS "Using ${COMPILER_LAUNCHER} as C compiler launcher")
@@ -19,8 +18,7 @@ function(setup_compiler_launcher_if_available)
1918
endif()
2019
endif()
2120

22-
if(NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER
23-
AND NOT DEFINED ENV{CMAKE_CXX_COMPILER_LAUNCHER})
21+
if(NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
2422
find_program(COMPILER_LAUNCHER NAMES ccache sccache)
2523
if(COMPILER_LAUNCHER)
2624
message(STATUS "Using ${COMPILER_LAUNCHER} as C++ compiler launcher")

0 commit comments

Comments
 (0)