mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
Upgrade the Rust Lance dependency, Java lance-core, and Python test dependency from beta.17 to the officially published [v15.0.0-beta.18](https://github.com/lance-format/lance/releases/tag/v15.0.0-beta.18) (`079fd77683a7acf056b0912f6ecda938e39ee120`). This provides a compatible SDK for the newer Lance source already adopted downstream. Rust registry versions and checksums are unchanged; the Python lock uses the six published beta.18 wheels. ### Compatibility The adopted release includes [Lance #10863](https://github.com/lance-format/lance/pull/10863): `FilteredReadOptionsProto.has_fragment_ids` distinguishes an explicit empty fragment selection. Older executors ignore this field, so upgrade executors before relying on the corrected empty-selection behavior. Rust callers constructing this generated struct need the new field. [Lance #10112](https://github.com/lance-format/lance/pull/10112) also replaces the internal `hamming_distance_batch` API with `hamming_distance_batch_into`. The Linux Python matrix timeout is raised from 30 to 60 minutes: the Python 3.13 cold native build and both test passes completed, but the job hit its limit during cleanup. Build profiles, test commands, and coverage are unchanged. ### Validation - Three native FRI/ANN regressions passed: deferred-compaction refined RQ, deferred index remapping, and approximate-query builder. - `cargo clippy --quiet --locked --features remote --tests --examples -- -D warnings` passed with pinned Rust 1.97.0. - Locked metadata, formatting, Python Makefile-scope Ruff checks, and `uv lock --check --offline` passed. - YAML, whitespace, end-of-file, and typo checks passed for the timeout-only workflow change. ### Publication and CI Java beta.18 is now published. After [Lance #10968](https://github.com/lance-format/lance/pull/10968) merged, the [normal publication workflow](https://github.com/lance-format/lance/actions/runs/43146352505) built all three JNI targets and published successfully; the Maven jar is available. The upstream Python publication run was cancelled after its Windows ARM job hit the one-hour timeout; six other wheels were published and are the actual artifacts recorded in this lock. Cross-platform SDK CI is still required. No performance claim is made by this dependency update.
286 lines
9.0 KiB
YAML
286 lines
9.0 KiB
YAML
name: Python
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- Cargo.toml
|
|
- Cargo.lock
|
|
- rust-toolchain.toml
|
|
- python/**
|
|
- rust/**
|
|
- .github/workflows/python.yml
|
|
- .github/workflows/build_linux_wheel/**
|
|
- .github/workflows/build_mac_wheel/**
|
|
- .github/workflows/build_windows_wheel/**
|
|
- .github/actions/setup-protoc/**
|
|
- .github/workflows/run_tests/**
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
# Color output for pytest is off by default.
|
|
PYTEST_ADDOPTS: "--color=yes"
|
|
FORCE_COLOR: "1"
|
|
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lance-format/ https://pypi.fury.io/lancedb/"
|
|
RUST_BACKTRACE: "1"
|
|
|
|
jobs:
|
|
lint:
|
|
name: "Lint"
|
|
timeout-minutes: 30
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install ruff
|
|
run: |
|
|
pip install ruff==0.9.9
|
|
- name: Format check
|
|
run: ruff format --check .
|
|
- name: Lint
|
|
run: ruff check .
|
|
|
|
type-check:
|
|
name: "Type Check"
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-2404-8x-x64
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install protobuf compiler
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
pip install toml
|
|
- name: Install dependencies
|
|
run: |
|
|
python ../ci/parse_requirements.py pyproject.toml --extras dev,tests,embeddings > requirements.txt
|
|
pip install -r requirements.txt
|
|
- name: Run pyright
|
|
run: pyright
|
|
|
|
doctest:
|
|
name: "Doctest"
|
|
timeout-minutes: 60
|
|
runs-on: ubuntu-2404-8x-x64
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "pip"
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
# `pip install -e .` builds the extension with maturin, which is most of
|
|
# this job's ~33 minutes. It had no Rust cache, so every dependency was
|
|
# recompiled from scratch on every run.
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
# Restore everywhere, but only save from main. Per-PR saves are
|
|
# unreadable outside their own branch anyway, since GitHub scopes
|
|
# caches to the creating ref.
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- name: Install
|
|
run: |
|
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
|
pip install mlx
|
|
- name: Test remote torch data loader
|
|
run: |
|
|
python -c "import torch"
|
|
pytest python/tests/test_torch.py::test_remote_permutation_dataloader_multiprocessing -q -rs
|
|
- name: Doctest
|
|
run: pytest --doctest-modules python/lancedb
|
|
linux:
|
|
name: "Linux: python-3.${{ matrix.python-minor-version }}"
|
|
# A cold native build plus both test passes can exhaust 30 minutes.
|
|
timeout-minutes: 60
|
|
strategy:
|
|
matrix:
|
|
python-minor-version: ["10", "13"]
|
|
runs-on: "ubuntu-24.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.${{ matrix.python-minor-version }}
|
|
- uses: ./.github/workflows/build_linux_wheel
|
|
with:
|
|
args: --profile ci
|
|
- uses: ./.github/workflows/run_tests
|
|
with:
|
|
integration: true
|
|
- name: Test without pylance or pandas
|
|
run: |
|
|
pip uninstall -y pylance pandas
|
|
# These modules still import optional packages during collection or
|
|
# exercise them throughout many tests; the full run above covers them.
|
|
pytest -m "not slow and not s3_test" -vv --durations=30 python/tests \
|
|
--ignore=python/tests/docs \
|
|
--ignore=python/tests/test_context.py \
|
|
--ignore=python/tests/test_db.py \
|
|
--ignore=python/tests/test_embeddings.py \
|
|
--ignore=python/tests/test_embeddings_slow.py \
|
|
--ignore=python/tests/test_namespace_integration.py \
|
|
--ignore=python/tests/test_query.py
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
platform:
|
|
name: "Mac: ${{ matrix.features }}"
|
|
strategy:
|
|
matrix:
|
|
features: ["default", "experimental-functions"]
|
|
# A cold native build plus experimental-functions tests can exceed 30 minutes.
|
|
timeout-minutes: 60
|
|
runs-on: macos-15
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
# maturin runs cargo natively on macOS (docker is Linux-only), so the host
|
|
# target dir is cacheable. This job had no Rust cache.
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
# Restore everywhere, but only save from main. Per-PR saves are
|
|
# unreadable outside their own branch anyway, since GitHub scopes
|
|
# caches to the creating ref.
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- uses: ./.github/workflows/build_mac_wheel
|
|
with:
|
|
args: --profile ci --features ${{ matrix.features }}
|
|
- uses: ./.github/workflows/run_tests
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
windows:
|
|
name: "Windows: ${{ matrix.config.name }}"
|
|
timeout-minutes: 60
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- name: x86
|
|
runner: windows-latest
|
|
runs-on: "${{ matrix.config.runner }}"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
# maturin runs cargo natively on Windows (docker is Linux-only), so the
|
|
# host target dir is cacheable. This job had no Rust cache at all and so
|
|
# rebuilt every dependency from scratch on every run.
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
# Restore everywhere, but only save from main. The repo sits at
|
|
# GitHub's cache cap, so per-PR saves just evict main's entries.
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- uses: ./.github/workflows/build_windows_wheel
|
|
with:
|
|
args: --profile ci
|
|
- uses: ./.github/workflows/run_tests
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
min-deps:
|
|
name: "Minimum dependencies"
|
|
timeout-minutes: 60
|
|
runs-on: "ubuntu-24.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.10"
|
|
# As with Doctest, `pip install -e .` compiles the extension and this job
|
|
# had no Rust cache, which is most of its ~37 minutes.
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
# Restore everywhere, but only save from main. Per-PR saves are
|
|
# unreadable outside their own branch anyway, since GitHub scopes
|
|
# caches to the creating ref.
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- name: Install lancedb
|
|
run: |
|
|
pip install "pydantic==2.7.4" "pyarrow==16"
|
|
pip install --extra-index-url https://pypi.fury.io/lance-format/ --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests]
|
|
- name: Run tests
|
|
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests
|