Skip to content

Commit 6fc5968

Browse files
Merge with 1.4-andium (#146)
2 parents dbe36b6 + d5a4a55 commit 6fc5968

File tree

3 files changed

+88
-3
lines changed

3 files changed

+88
-3
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Targeted Platform Testing
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
platform:
7+
description: 'Platform to test on'
8+
required: true
9+
type: choice
10+
options:
11+
- 'windows-2025'
12+
- 'ubuntu-24.04'
13+
- 'ubuntu-24.04-arm'
14+
- 'macos-15'
15+
- 'macos-15-intel'
16+
python_version:
17+
description: 'Python version to test'
18+
required: true
19+
type: choice
20+
options:
21+
- '3.9'
22+
- '3.10'
23+
- '3.11'
24+
- '3.12'
25+
- '3.13'
26+
- '3.14'
27+
testsuite:
28+
description: 'Test suite to run (ignored if custom_test_path is provided)'
29+
required: false
30+
type: choice
31+
options:
32+
- 'fast'
33+
- 'all'
34+
default: 'fast'
35+
custom_test_path:
36+
description: 'Custom test path (must be in tests/ directory, overrides testsuite)'
37+
required: false
38+
type: string
39+
40+
jobs:
41+
test:
42+
name: 'Test with Python ${{ inputs.python_version }} on ${{ inputs.platform }}'
43+
runs-on: ${{ inputs.platform }}
44+
45+
steps:
46+
- name: Checkout DuckDB Python
47+
uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
submodules: true
51+
52+
- name: Install uv
53+
uses: astral-sh/setup-uv@v7
54+
with:
55+
version: "0.9.0"
56+
enable-cache: false
57+
python-version: ${{ inputs.python_version }}
58+
59+
- name: Set and validate test path
60+
id: test_path
61+
shell: bash
62+
run: |
63+
if [[ -n "${{ inputs.custom_test_path }}" ]]; then
64+
# test path was passed in
65+
tests_base="$( pwd -P )/tests"
66+
test_path="${{ inputs.custom_test_path }}"
67+
68+
# Ensure the given test path exists
69+
[[ -e "$test_path" ]] || { echo "${test_path} does not exist"; exit 1; }
70+
71+
# Resolve custom test path to absolute path
72+
test_path_abs=$(cd "$test_path" 2>/dev/null && pwd -P || ( cd "$(dirname "$test_path")" && printf '%s/%s' "$(pwd -P)" "$(basename "$test_path")" ) )
73+
74+
# Make sure test_path_abs is inside tests_base
75+
[[ "$test_path_abs" == "$tests_base" || "$test_path_abs" == "$tests_base"/* ]] || { echo "${test_path_abs} is not part of ${tests_base}?"; exit 1; }
76+
77+
echo "test_path=$test_path_abs" >> $GITHUB_OUTPUT
78+
else
79+
# use a testsuite
80+
echo "test_path=$GITHUB_WORKSPACE/${{ inputs.testsuite == 'fast' && 'tests/fast' || 'tests' }}" >> $GITHUB_OUTPUT
81+
fi
82+
83+
- name: Run tests
84+
shell: bash
85+
run: |
86+
uv run pytest -vv ${{ steps.test_path.outputs.test_path }}

adbc_driver_duckdb/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import enum
2121
import functools
22-
import importlib
22+
import importlib.util
2323
import typing
2424

2525
import adbc_driver_manager
@@ -46,5 +46,4 @@ def driver_path() -> str:
4646
if duckdb_module_spec is None:
4747
msg = "Could not find duckdb shared library. Did you pip install duckdb?"
4848
raise ImportError(msg)
49-
print(f"Found duckdb shared library at {duckdb_module_spec.origin}")
5049
return duckdb_module_spec.origin

external/duckdb

Submodule duckdb updated 165 files

0 commit comments

Comments
 (0)