mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-04 19:02:58 +00:00
Compare commits
1 Commits
python-v0.
...
v0.22.4-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1facbe963 |
@@ -63,18 +63,27 @@ jobs:
|
|||||||
git config user.name "lancedb automation"
|
git config user.name "lancedb automation"
|
||||||
git config user.email "robot@lancedb.com"
|
git config user.email "robot@lancedb.com"
|
||||||
|
|
||||||
|
- name: Configure Codex authentication
|
||||||
|
env:
|
||||||
|
CODEX_TOKEN_B64: ${{ secrets.CODEX_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [ -z "${CODEX_TOKEN_B64}" ]; then
|
||||||
|
echo "Repository secret CODEX_TOKEN is not defined; skipping Codex execution."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mkdir -p ~/.codex
|
||||||
|
echo "${CODEX_TOKEN_B64}" | base64 --decode > ~/.codex/auth.json
|
||||||
|
|
||||||
- name: Run Codex to update Lance dependency
|
- name: Run Codex to update Lance dependency
|
||||||
env:
|
env:
|
||||||
TAG: ${{ inputs.tag }}
|
TAG: ${{ inputs.tag }}
|
||||||
GITHUB_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
||||||
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
||||||
OPENAI_API_KEY: ${{ secrets.CODEX_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
VERSION="${TAG#refs/tags/}"
|
VERSION="${TAG#refs/tags/}"
|
||||||
VERSION="${VERSION#v}"
|
VERSION="${VERSION#v}"
|
||||||
BRANCH_NAME="codex/update-lance-${VERSION//[^a-zA-Z0-9]/-}"
|
BRANCH_NAME="codex/update-lance-${VERSION//[^a-zA-Z0-9]/-}"
|
||||||
|
|
||||||
cat <<EOF >/tmp/codex-prompt.txt
|
cat <<EOF >/tmp/codex-prompt.txt
|
||||||
You are running inside the lancedb repository on a GitHub Actions runner. Update the Lance dependency to version ${VERSION} and prepare a pull request for maintainers to review.
|
You are running inside the lancedb repository on a GitHub Actions runner. Update the Lance dependency to version ${VERSION} and prepare a pull request for maintainers to review.
|
||||||
|
|
||||||
@@ -95,6 +104,4 @@ jobs:
|
|||||||
- Do not merge the PR.
|
- Do not merge the PR.
|
||||||
- If any command fails, diagnose and fix the issue instead of aborting.
|
- If any command fails, diagnose and fix the issue instead of aborting.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
printenv OPENAI_API_KEY | codex login --with-api-key
|
|
||||||
codex --config shell_environment_policy.ignore_default_excludes=true exec --dangerously-bypass-approvals-and-sandbox "$(cat /tmp/codex-prompt.txt)"
|
codex --config shell_environment_policy.ignore_default_excludes=true exec --dangerously-bypass-approvals-and-sandbox "$(cat /tmp/codex-prompt.txt)"
|
||||||
|
|||||||
62
.github/workflows/lance-release-timer.yml
vendored
62
.github/workflows/lance-release-timer.yml
vendored
@@ -1,62 +0,0 @@
|
|||||||
name: Lance Release Timer
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "*/10 * * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
actions: write
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: lance-release-timer
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
trigger-update:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Check for new Lance tag
|
|
||||||
id: check
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
|
||||||
run: |
|
|
||||||
python3 ci/check_lance_release.py --github-output "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Look for existing PR
|
|
||||||
if: steps.check.outputs.needs_update == 'true'
|
|
||||||
id: pr
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
TITLE="chore: update lance dependency to v${{ steps.check.outputs.latest_version }}"
|
|
||||||
COUNT=$(gh pr list --search "\"$TITLE\" in:title" --state open --limit 1 --json number --jq 'length')
|
|
||||||
if [ "$COUNT" -gt 0 ]; then
|
|
||||||
echo "Open PR already exists for $TITLE"
|
|
||||||
echo "pr_exists=true" >> "$GITHUB_OUTPUT"
|
|
||||||
else
|
|
||||||
echo "No existing PR for $TITLE"
|
|
||||||
echo "pr_exists=false" >> "$GITHUB_OUTPUT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Trigger codex update workflow
|
|
||||||
if: steps.check.outputs.needs_update == 'true' && steps.pr.outputs.pr_exists != 'true'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
TAG=${{ steps.check.outputs.latest_tag }}
|
|
||||||
gh workflow run codex-update-lance-dependency.yml -f tag=refs/tags/$TAG
|
|
||||||
|
|
||||||
- name: Show latest codex workflow run
|
|
||||||
if: steps.check.outputs.needs_update == 'true' && steps.pr.outputs.pr_exists != 'true'
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.ROBOT_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -euo pipefail
|
|
||||||
gh run list --workflow codex-update-lance-dependency.yml --limit 1 --json databaseId,htmlUrl,displayTitle
|
|
||||||
25
.github/workflows/nodejs.yml
vendored
25
.github/workflows/nodejs.yml
vendored
@@ -16,6 +16,9 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
# Disable full debug symbol generation to speed up CI build and keep memory down
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -40,20 +43,18 @@ jobs:
|
|||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
cache-dependency-path: nodejs/package-lock.json
|
cache-dependency-path: nodejs/package-lock.json
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler libssl-dev
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
- name: Format Rust
|
with:
|
||||||
run: cargo fmt --all -- --check
|
components: rustfmt, clippy
|
||||||
- name: Lint Rust
|
- name: Lint
|
||||||
run: cargo clippy --profile ci --all --all-features -- -D warnings
|
|
||||||
- name: Lint Typescript
|
|
||||||
run: |
|
run: |
|
||||||
|
cargo fmt --all -- --check
|
||||||
|
cargo clippy --all --all-features -- -D warnings
|
||||||
npm ci
|
npm ci
|
||||||
npm run lint-ci
|
npm run lint-ci
|
||||||
- name: Lint examples
|
- name: Lint examples
|
||||||
@@ -89,8 +90,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run build:debug -- --profile ci
|
npm run build
|
||||||
npm run tsc
|
|
||||||
- name: Setup localstack
|
- name: Setup localstack
|
||||||
working-directory: .
|
working-directory: .
|
||||||
run: docker compose up --detach --wait
|
run: docker compose up --detach --wait
|
||||||
@@ -147,8 +147,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npm run build:debug -- --profile ci
|
npm run build
|
||||||
npm run tsc
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
npm run test
|
npm run test
|
||||||
|
|||||||
19
.github/workflows/python.yml
vendored
19
.github/workflows/python.yml
vendored
@@ -19,7 +19,6 @@ env:
|
|||||||
PYTEST_ADDOPTS: "--color=yes"
|
PYTEST_ADDOPTS: "--color=yes"
|
||||||
FORCE_COLOR: "1"
|
FORCE_COLOR: "1"
|
||||||
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lancedb/"
|
PIP_EXTRA_INDEX_URL: "https://pypi.fury.io/lancedb/"
|
||||||
RUST_BACKTRACE: "1"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -98,6 +97,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y protobuf-compiler
|
sudo apt install -y protobuf-compiler
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: python
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
pip install --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
pip install --extra-index-url https://pypi.fury.io/lancedb/ -e .[tests,dev,embeddings]
|
||||||
@@ -129,9 +131,10 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.${{ matrix.python-minor-version }}
|
python-version: 3.${{ matrix.python-minor-version }}
|
||||||
- uses: ./.github/workflows/build_linux_wheel
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
args: --profile ci
|
workspaces: python
|
||||||
|
- uses: ./.github/workflows/build_linux_wheel
|
||||||
- uses: ./.github/workflows/run_tests
|
- uses: ./.github/workflows/run_tests
|
||||||
with:
|
with:
|
||||||
integration: true
|
integration: true
|
||||||
@@ -166,9 +169,10 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
- uses: ./.github/workflows/build_mac_wheel
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
args: --profile ci
|
workspaces: python
|
||||||
|
- uses: ./.github/workflows/build_mac_wheel
|
||||||
- uses: ./.github/workflows/run_tests
|
- uses: ./.github/workflows/run_tests
|
||||||
# Make sure wheels are not included in the Rust cache
|
# Make sure wheels are not included in the Rust cache
|
||||||
- name: Delete wheels
|
- name: Delete wheels
|
||||||
@@ -195,9 +199,10 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
- uses: ./.github/workflows/build_windows_wheel
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
args: --profile ci
|
workspaces: python
|
||||||
|
- uses: ./.github/workflows/build_windows_wheel
|
||||||
- uses: ./.github/workflows/run_tests
|
- uses: ./.github/workflows/run_tests
|
||||||
# Make sure wheels are not included in the Rust cache
|
# Make sure wheels are not included in the Rust cache
|
||||||
- name: Delete wheels
|
- name: Delete wheels
|
||||||
|
|||||||
42
.github/workflows/rust.yml
vendored
42
.github/workflows/rust.yml
vendored
@@ -18,7 +18,11 @@ env:
|
|||||||
# This env var is used by Swatinem/rust-cache@v2 for the cache
|
# This env var is used by Swatinem/rust-cache@v2 for the cache
|
||||||
# key, so we set it to make sure it is always consistent.
|
# key, so we set it to make sure it is always consistent.
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
# Disable full debug symbol generation to speed up CI build and keep memory down
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
|
CARGO_INCREMENTAL: 0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -40,6 +44,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -47,7 +53,7 @@ jobs:
|
|||||||
- name: Run format
|
- name: Run format
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy --profile ci --workspace --tests --all-features -- -D warnings
|
run: cargo clippy --workspace --tests --all-features -- -D warnings
|
||||||
|
|
||||||
build-no-lock:
|
build-no-lock:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -74,7 +80,7 @@ jobs:
|
|||||||
sudo apt install -y protobuf-compiler libssl-dev
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
- name: Build all
|
- name: Build all
|
||||||
run: |
|
run: |
|
||||||
cargo build --profile ci --benches --all-features --tests
|
cargo build --benches --all-features --tests
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -97,8 +103,14 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
lfs: true
|
lfs: true
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt install -y protobuf-compiler libssl-dev
|
run: |
|
||||||
|
# This shaves 2 minutes off this step in CI. This doesn't seem to be
|
||||||
|
# necessary in standard runners, but it is in the 4x runners.
|
||||||
|
sudo rm /var/lib/man-db/auto-update
|
||||||
|
sudo apt install -y protobuf-compiler libssl-dev
|
||||||
- uses: rui314/setup-mold@v1
|
- uses: rui314/setup-mold@v1
|
||||||
- name: Make Swap
|
- name: Make Swap
|
||||||
run: |
|
run: |
|
||||||
@@ -107,16 +119,16 @@ jobs:
|
|||||||
sudo mkswap /swapfile
|
sudo mkswap /swapfile
|
||||||
sudo swapon /swapfile
|
sudo swapon /swapfile
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --profile ci --all-features --tests --locked --examples
|
run: cargo build --all-features --tests --locked --examples
|
||||||
- name: Run feature tests
|
- name: Run feature tests
|
||||||
run: CARGO_ARGS="--profile ci" make -C ./lancedb feature-tests
|
run: make -C ./lancedb feature-tests
|
||||||
- name: Run examples
|
- name: Run examples
|
||||||
run: cargo run --profile ci --example simple --locked
|
run: cargo run --example simple --locked
|
||||||
- name: Run remote tests
|
- name: Run remote tests
|
||||||
# Running this requires access to secrets, so skip if this is
|
# Running this requires access to secrets, so skip if this is
|
||||||
# a PR from a fork.
|
# a PR from a fork.
|
||||||
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
|
if: github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork
|
||||||
run: CARGO_ARGS="--profile ci" make -C ./lancedb remote-tests
|
run: make -C ./lancedb remote-tests
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -136,6 +148,8 @@ jobs:
|
|||||||
- name: CPU features
|
- name: CPU features
|
||||||
run: sysctl -a | grep cpu
|
run: sysctl -a | grep cpu
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: brew install protobuf
|
run: brew install protobuf
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
@@ -145,7 +159,7 @@ jobs:
|
|||||||
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps \
|
ALL_FEATURES=`cargo metadata --format-version=1 --no-deps \
|
||||||
| jq -r '.packages[] | .features | keys | .[]' \
|
| jq -r '.packages[] | .features | keys | .[]' \
|
||||||
| grep -v s3-test | sort | uniq | paste -s -d "," -`
|
| grep -v s3-test | sort | uniq | paste -s -d "," -`
|
||||||
cargo test --profile ci --features $ALL_FEATURES --locked
|
cargo test --features $ALL_FEATURES --locked
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@@ -159,21 +173,22 @@ jobs:
|
|||||||
working-directory: rust/lancedb
|
working-directory: rust/lancedb
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set target
|
|
||||||
run: rustup target add ${{ matrix.target }}
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: rust
|
||||||
- name: Install Protoc v21.12
|
- name: Install Protoc v21.12
|
||||||
run: choco install --no-progress protoc
|
run: choco install --no-progress protoc
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
rustup target add ${{ matrix.target }}
|
||||||
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
|
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
|
||||||
cargo build --profile ci --features remote --tests --locked --target ${{ matrix.target }}
|
cargo build --features remote --tests --locked --target ${{ matrix.target }}
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
# Can only run tests when target matches host
|
# Can only run tests when target matches host
|
||||||
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
|
if: ${{ matrix.target == 'x86_64-pc-windows-msvc' }}
|
||||||
run: |
|
run: |
|
||||||
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
|
$env:VCPKG_ROOT = $env:VCPKG_INSTALLATION_ROOT
|
||||||
cargo test --profile ci --features remote --locked
|
cargo test --features remote --locked
|
||||||
|
|
||||||
msrv:
|
msrv:
|
||||||
# Check the minimum supported Rust version
|
# Check the minimum supported Rust version
|
||||||
@@ -198,7 +213,6 @@ jobs:
|
|||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.msrv }}
|
toolchain: ${{ matrix.msrv }}
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Downgrade dependencies
|
- name: Downgrade dependencies
|
||||||
# These packages have newer requirements for MSRV
|
# These packages have newer requirements for MSRV
|
||||||
run: |
|
run: |
|
||||||
@@ -212,4 +226,4 @@ jobs:
|
|||||||
cargo update -p aws-sdk-sts --precise 1.51.0
|
cargo update -p aws-sdk-sts --precise 1.51.0
|
||||||
cargo update -p home --precise 0.5.9
|
cargo update -p home --precise 0.5.9
|
||||||
- name: cargo +${{ matrix.msrv }} check
|
- name: cargo +${{ matrix.msrv }} check
|
||||||
run: cargo check --profile ci --workspace --tests --benches --all-features
|
run: cargo check --workspace --tests --benches --all-features
|
||||||
|
|||||||
70
Cargo.lock
generated
70
Cargo.lock
generated
@@ -3032,8 +3032,8 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fsst"
|
name = "fsst"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"rand 0.9.2",
|
"rand 0.9.2",
|
||||||
@@ -4217,8 +4217,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance"
|
name = "lance"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4282,8 +4282,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-arrow"
|
name = "lance-arrow"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
@@ -4301,8 +4301,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-bitpacking"
|
name = "lance-bitpacking"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"paste",
|
"paste",
|
||||||
@@ -4311,8 +4311,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-core"
|
name = "lance-core"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
@@ -4348,8 +4348,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-datafusion"
|
name = "lance-datafusion"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4378,8 +4378,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-datagen"
|
name = "lance-datagen"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4396,8 +4396,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-encoding"
|
name = "lance-encoding"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4434,8 +4434,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-file"
|
name = "lance-file"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4467,8 +4467,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-index"
|
name = "lance-index"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4529,8 +4529,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-io"
|
name = "lance-io"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4570,8 +4570,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-linalg"
|
name = "lance-linalg"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
@@ -4587,8 +4587,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-namespace"
|
name = "lance-namespace"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -4600,8 +4600,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-namespace-impls"
|
name = "lance-namespace-impls"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-ipc",
|
"arrow-ipc",
|
||||||
@@ -4639,8 +4639,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-table"
|
name = "lance-table"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4679,8 +4679,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-testing"
|
name = "lance-testing"
|
||||||
version = "1.0.0-beta.3"
|
version = "1.0.0-beta.2"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0-beta.3#95ff7f6e684c1911fc00c9c2811cce1a61c06ff5"
|
source = "git+https://github.com/lancedb/lance.git?tag=v1.0.0-beta.2#254a8217ac26666585983aa7ec8c4234f4c3f99f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-schema",
|
"arrow-schema",
|
||||||
@@ -4691,7 +4691,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb"
|
name = "lancedb"
|
||||||
version = "0.22.4-beta.0"
|
version = "0.22.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
@@ -4786,7 +4786,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb-nodejs"
|
name = "lancedb-nodejs"
|
||||||
version = "0.22.4-beta.0"
|
version = "0.22.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-ipc",
|
"arrow-ipc",
|
||||||
@@ -4806,7 +4806,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lancedb-python"
|
name = "lancedb-python"
|
||||||
version = "0.25.4-beta.0"
|
version = "0.25.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
|||||||
42
Cargo.toml
42
Cargo.toml
@@ -15,20 +15,20 @@ categories = ["database-implementations"]
|
|||||||
rust-version = "1.78.0"
|
rust-version = "1.78.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lance = { "version" = "=1.0.0-beta.3", default-features = false, "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance = { "version" = "=1.0.0-beta.2", default-features = false, "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-core = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-core = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-datagen = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datagen = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-file = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-file = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-io = { "version" = "=1.0.0-beta.3", default-features = false, "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-io = { "version" = "=1.0.0-beta.2", default-features = false, "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-index = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-index = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-linalg = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-linalg = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-namespace = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-namespace-impls = { "version" = "=1.0.0-beta.3", "features" = ["dir-aws", "dir-gcp", "dir-azure", "dir-oss", "rest"], "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace-impls = { "version" = "=1.0.0-beta.2", "features" = ["dir-aws", "dir-gcp", "dir-azure", "dir-oss", "rest"], "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-table = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-table = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-testing = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-testing = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-datafusion = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datafusion = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-encoding = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-encoding = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-arrow = { "version" = "=1.0.0-beta.3", "tag" = "v1.0.0-beta.3", "git" = "https://github.com/lance-format/lance.git" }
|
lance-arrow = { "version" = "=1.0.0-beta.2", "tag" = "v1.0.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
ahash = "0.8"
|
ahash = "0.8"
|
||||||
# Note that this one does not include pyarrow
|
# Note that this one does not include pyarrow
|
||||||
arrow = { version = "56.2", optional = false }
|
arrow = { version = "56.2", optional = false }
|
||||||
@@ -63,17 +63,3 @@ regex = "1.10"
|
|||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
semver = "1.0.25"
|
semver = "1.0.25"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
|
||||||
[profile.ci]
|
|
||||||
debug = "line-tables-only"
|
|
||||||
inherits = "dev"
|
|
||||||
incremental = false
|
|
||||||
|
|
||||||
# This rule applies to every package except workspace members (dependencies
|
|
||||||
# such as `arrow` and `tokio`). It disables debug info and related features on
|
|
||||||
# dependencies so their binaries stay smaller, improving cache reuse.
|
|
||||||
[profile.ci.package."*"]
|
|
||||||
debug = false
|
|
||||||
debug-assertions = false
|
|
||||||
strip = "debuginfo"
|
|
||||||
incremental = false
|
|
||||||
|
|||||||
@@ -1,208 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Determine whether a newer Lance tag exists and expose results for CI."""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
from dataclasses import dataclass
|
|
||||||
from pathlib import Path
|
|
||||||
from typing import Iterable, List, Sequence, Tuple, Union
|
|
||||||
|
|
||||||
try: # Python >=3.11
|
|
||||||
import tomllib # type: ignore
|
|
||||||
except ModuleNotFoundError: # pragma: no cover - fallback for older Python
|
|
||||||
import tomli as tomllib # type: ignore
|
|
||||||
|
|
||||||
LANCE_REPO = "lance-format/lance"
|
|
||||||
|
|
||||||
SEMVER_RE = re.compile(
|
|
||||||
r"^\s*(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)"
|
|
||||||
r"(?:-(?P<prerelease>[0-9A-Za-z.-]+))?"
|
|
||||||
r"(?:\+[0-9A-Za-z.-]+)?\s*$"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class SemVer:
|
|
||||||
major: int
|
|
||||||
minor: int
|
|
||||||
patch: int
|
|
||||||
prerelease: Tuple[Union[int, str], ...]
|
|
||||||
|
|
||||||
def __lt__(self, other: "SemVer") -> bool: # pragma: no cover - simple comparison
|
|
||||||
if (self.major, self.minor, self.patch) != (other.major, other.minor, other.patch):
|
|
||||||
return (self.major, self.minor, self.patch) < (other.major, other.minor, other.patch)
|
|
||||||
if self.prerelease == other.prerelease:
|
|
||||||
return False
|
|
||||||
if not self.prerelease:
|
|
||||||
return False # release > anything else
|
|
||||||
if not other.prerelease:
|
|
||||||
return True
|
|
||||||
for left, right in zip(self.prerelease, other.prerelease):
|
|
||||||
if left == right:
|
|
||||||
continue
|
|
||||||
if isinstance(left, int) and isinstance(right, int):
|
|
||||||
return left < right
|
|
||||||
if isinstance(left, int):
|
|
||||||
return True
|
|
||||||
if isinstance(right, int):
|
|
||||||
return False
|
|
||||||
return str(left) < str(right)
|
|
||||||
return len(self.prerelease) < len(other.prerelease)
|
|
||||||
|
|
||||||
def __eq__(self, other: object) -> bool: # pragma: no cover - trivial
|
|
||||||
if not isinstance(other, SemVer):
|
|
||||||
return NotImplemented
|
|
||||||
return (
|
|
||||||
self.major == other.major
|
|
||||||
and self.minor == other.minor
|
|
||||||
and self.patch == other.patch
|
|
||||||
and self.prerelease == other.prerelease
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_semver(raw: str) -> SemVer:
|
|
||||||
match = SEMVER_RE.match(raw)
|
|
||||||
if not match:
|
|
||||||
raise ValueError(f"Unsupported version format: {raw}")
|
|
||||||
prerelease = match.group("prerelease")
|
|
||||||
parts: Tuple[Union[int, str], ...] = ()
|
|
||||||
if prerelease:
|
|
||||||
parsed: List[Union[int, str]] = []
|
|
||||||
for piece in prerelease.split("."):
|
|
||||||
if piece.isdigit():
|
|
||||||
parsed.append(int(piece))
|
|
||||||
else:
|
|
||||||
parsed.append(piece)
|
|
||||||
parts = tuple(parsed)
|
|
||||||
return SemVer(
|
|
||||||
major=int(match.group("major")),
|
|
||||||
minor=int(match.group("minor")),
|
|
||||||
patch=int(match.group("patch")),
|
|
||||||
prerelease=parts,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class TagInfo:
|
|
||||||
tag: str # e.g. v1.0.0-beta.2
|
|
||||||
version: str # e.g. 1.0.0-beta.2
|
|
||||||
semver: SemVer
|
|
||||||
|
|
||||||
|
|
||||||
def run_command(cmd: Sequence[str]) -> str:
|
|
||||||
result = subprocess.run(cmd, capture_output=True, text=True, check=False)
|
|
||||||
if result.returncode != 0:
|
|
||||||
raise RuntimeError(
|
|
||||||
f"Command {' '.join(cmd)} failed with {result.returncode}: {result.stderr.strip()}"
|
|
||||||
)
|
|
||||||
return result.stdout.strip()
|
|
||||||
|
|
||||||
|
|
||||||
def fetch_remote_tags() -> List[TagInfo]:
|
|
||||||
output = run_command(
|
|
||||||
[
|
|
||||||
"gh",
|
|
||||||
"api",
|
|
||||||
"-X",
|
|
||||||
"GET",
|
|
||||||
f"repos/{LANCE_REPO}/git/refs/tags",
|
|
||||||
"--paginate",
|
|
||||||
"--jq",
|
|
||||||
".[].ref",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
tags: List[TagInfo] = []
|
|
||||||
for line in output.splitlines():
|
|
||||||
ref = line.strip()
|
|
||||||
if not ref.startswith("refs/tags/v"):
|
|
||||||
continue
|
|
||||||
tag = ref.split("refs/tags/")[-1]
|
|
||||||
version = tag.lstrip("v")
|
|
||||||
try:
|
|
||||||
tags.append(TagInfo(tag=tag, version=version, semver=parse_semver(version)))
|
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
if not tags:
|
|
||||||
raise RuntimeError("No Lance tags could be parsed from GitHub API output")
|
|
||||||
return tags
|
|
||||||
|
|
||||||
|
|
||||||
def read_current_version(repo_root: Path) -> str:
|
|
||||||
cargo_path = repo_root / "Cargo.toml"
|
|
||||||
with cargo_path.open("rb") as fh:
|
|
||||||
data = tomllib.load(fh)
|
|
||||||
try:
|
|
||||||
deps = data["workspace"]["dependencies"]
|
|
||||||
entry = deps["lance"]
|
|
||||||
except KeyError as exc: # pragma: no cover - configuration guard
|
|
||||||
raise RuntimeError("Failed to locate workspace.dependencies.lance in Cargo.toml") from exc
|
|
||||||
|
|
||||||
if isinstance(entry, str):
|
|
||||||
raw_version = entry
|
|
||||||
elif isinstance(entry, dict):
|
|
||||||
raw_version = entry.get("version", "")
|
|
||||||
else: # pragma: no cover - defensive
|
|
||||||
raise RuntimeError("Unexpected lance dependency format")
|
|
||||||
|
|
||||||
raw_version = raw_version.strip()
|
|
||||||
if not raw_version:
|
|
||||||
raise RuntimeError("lance dependency does not declare a version")
|
|
||||||
return raw_version.lstrip("=")
|
|
||||||
|
|
||||||
|
|
||||||
def determine_latest_tag(tags: Iterable[TagInfo]) -> TagInfo:
|
|
||||||
return max(tags, key=lambda tag: tag.semver)
|
|
||||||
|
|
||||||
|
|
||||||
def write_outputs(args: argparse.Namespace, payload: dict) -> None:
|
|
||||||
target = getattr(args, "github_output", None)
|
|
||||||
if not target:
|
|
||||||
return
|
|
||||||
with open(target, "a", encoding="utf-8") as handle:
|
|
||||||
for key, value in payload.items():
|
|
||||||
handle.write(f"{key}={value}\n")
|
|
||||||
|
|
||||||
|
|
||||||
def main(argv: Sequence[str] | None = None) -> int:
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
|
||||||
parser.add_argument(
|
|
||||||
"--repo-root",
|
|
||||||
default=Path(__file__).resolve().parents[1],
|
|
||||||
type=Path,
|
|
||||||
help="Path to the lancedb repository root",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--github-output",
|
|
||||||
default=os.environ.get("GITHUB_OUTPUT"),
|
|
||||||
help="Optional file path for writing GitHub Action outputs",
|
|
||||||
)
|
|
||||||
args = parser.parse_args(argv)
|
|
||||||
|
|
||||||
repo_root = Path(args.repo_root)
|
|
||||||
current_version = read_current_version(repo_root)
|
|
||||||
current_semver = parse_semver(current_version)
|
|
||||||
|
|
||||||
tags = fetch_remote_tags()
|
|
||||||
latest = determine_latest_tag(tags)
|
|
||||||
needs_update = latest.semver > current_semver
|
|
||||||
|
|
||||||
payload = {
|
|
||||||
"current_version": current_version,
|
|
||||||
"current_tag": f"v{current_version}",
|
|
||||||
"latest_version": latest.version,
|
|
||||||
"latest_tag": latest.tag,
|
|
||||||
"needs_update": "true" if needs_update else "false",
|
|
||||||
}
|
|
||||||
|
|
||||||
print(json.dumps(payload))
|
|
||||||
write_outputs(args, payload)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
@@ -3,8 +3,6 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
|
||||||
LANCE_GIT_URL = "https://github.com/lance-format/lance.git"
|
|
||||||
|
|
||||||
|
|
||||||
def run_command(command: str) -> str:
|
def run_command(command: str) -> str:
|
||||||
"""
|
"""
|
||||||
@@ -31,7 +29,7 @@ def get_latest_stable_version() -> str:
|
|||||||
|
|
||||||
def get_latest_preview_version() -> str:
|
def get_latest_preview_version() -> str:
|
||||||
lance_tags = run_command(
|
lance_tags = run_command(
|
||||||
f"git ls-remote --tags {LANCE_GIT_URL} | grep 'refs/tags/v[0-9beta.-]\\+$'"
|
"git ls-remote --tags https://github.com/lancedb/lance.git | grep 'refs/tags/v[0-9beta.-]\\+$'"
|
||||||
).splitlines()
|
).splitlines()
|
||||||
lance_tags = (
|
lance_tags = (
|
||||||
tag.split("refs/tags/")[1]
|
tag.split("refs/tags/")[1]
|
||||||
@@ -178,8 +176,8 @@ def set_stable_version(version: str):
|
|||||||
def set_preview_version(version: str):
|
def set_preview_version(version: str):
|
||||||
"""
|
"""
|
||||||
Sets lines to
|
Sets lines to
|
||||||
lance = { "version" = "=0.29.0", default-features = false, "features" = ["dynamodb"], "tag" = "v0.29.0-beta.2", "git" = LANCE_GIT_URL }
|
lance = { "version" = "=0.29.0", default-features = false, "features" = ["dynamodb"], "tag" = "v0.29.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
lance-io = { "version" = "=0.29.0", default-features = false, "tag" = "v0.29.0-beta.2", "git" = LANCE_GIT_URL }
|
lance-io = { "version" = "=0.29.0", default-features = false, "tag" = "v0.29.0-beta.2", "git" = "https://github.com/lancedb/lance.git" }
|
||||||
...
|
...
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -196,7 +194,7 @@ def set_preview_version(version: str):
|
|||||||
config["features"] = features
|
config["features"] = features
|
||||||
|
|
||||||
config["tag"] = f"v{version}"
|
config["tag"] = f"v{version}"
|
||||||
config["git"] = LANCE_GIT_URL
|
config["git"] = "https://github.com/lancedb/lance.git"
|
||||||
|
|
||||||
return dict_to_toml_line(package_name, config)
|
return dict_to_toml_line(package_name, config)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Contributing to LanceDB Typescript
|
# Contributing to LanceDB Typescript
|
||||||
|
|
||||||
This document outlines the process for contributing to LanceDB Typescript.
|
This document outlines the process for contributing to LanceDB Typescript.
|
||||||
For general contribution guidelines, see [CONTRIBUTING.md](../CONTRIBUTING.md).
|
For general contribution guidelines, see [CONTRIBUTING.md](../../../../CONTRIBUTING.md).
|
||||||
|
|
||||||
## Project layout
|
## Project layout
|
||||||
|
|
||||||
|
|||||||
4
nodejs/package-lock.json
generated
4
nodejs/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@lancedb/lancedb",
|
"name": "@lancedb/lancedb",
|
||||||
"version": "0.22.4-beta.0",
|
"version": "0.22.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lancedb/lancedb",
|
"name": "@lancedb/lancedb",
|
||||||
"version": "0.22.4-beta.0",
|
"version": "0.22.3",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64",
|
"x64",
|
||||||
"arm64"
|
"arm64"
|
||||||
|
|||||||
@@ -73,10 +73,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"artifacts": "napi artifacts",
|
"artifacts": "napi artifacts",
|
||||||
"build:debug": "napi build --platform --no-const-enum --dts ../lancedb/native.d.ts --js ../lancedb/native.js lancedb",
|
"build:debug": "napi build --platform --no-const-enum --dts ../lancedb/native.d.ts --js ../lancedb/native.js lancedb",
|
||||||
"postbuild:debug": "shx mkdir -p dist && shx cp lancedb/*.node dist/",
|
|
||||||
"build:release": "napi build --platform --no-const-enum --release --dts ../lancedb/native.d.ts --js ../lancedb/native.js dist/",
|
"build:release": "napi build --platform --no-const-enum --release --dts ../lancedb/native.d.ts --js ../lancedb/native.js dist/",
|
||||||
"postbuild:release": "shx mkdir -p dist && shx cp lancedb/*.node dist/",
|
"build": "npm run build:debug && npm run tsc && shx cp lancedb/*.node dist/",
|
||||||
"build": "npm run build:debug && npm run tsc",
|
|
||||||
"build-release": "npm run build:release && npm run tsc",
|
"build-release": "npm run build:release && npm run tsc",
|
||||||
"tsc": "tsc -b",
|
"tsc": "tsc -b",
|
||||||
"posttsc": "shx cp lancedb/native.d.ts dist/native.d.ts",
|
"posttsc": "shx cp lancedb/native.d.ts dist/native.d.ts",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.25.4-beta.1"
|
current_version = "0.25.4-beta.0"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lancedb-python"
|
name = "lancedb-python"
|
||||||
version = "0.25.4-beta.1"
|
version = "0.25.4-beta.0"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
description = "Python bindings for LanceDB"
|
description = "Python bindings for LanceDB"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|||||||
@@ -472,12 +472,6 @@ class LanceDBConnection(DBConnection):
|
|||||||
uri = uri[7:] # Remove "file://"
|
uri = uri[7:] # Remove "file://"
|
||||||
elif uri.startswith("file:/"):
|
elif uri.startswith("file:/"):
|
||||||
uri = uri[5:] # Remove "file:"
|
uri = uri[5:] # Remove "file:"
|
||||||
|
|
||||||
if sys.platform == "win32":
|
|
||||||
# On Windows, a path like /C:/path should become C:/path
|
|
||||||
if len(uri) >= 3 and uri[0] == "/" and uri[2] == ":":
|
|
||||||
uri = uri[1:]
|
|
||||||
|
|
||||||
uri = Path(uri)
|
uri = Path(uri)
|
||||||
uri = uri.expanduser().absolute()
|
uri = uri.expanduser().absolute()
|
||||||
Path(uri).mkdir(parents=True, exist_ok=True)
|
Path(uri).mkdir(parents=True, exist_ok=True)
|
||||||
|
|||||||
@@ -99,14 +99,7 @@ def _convert_pyarrow_schema_to_json(schema: pa.Schema) -> JsonArrowSchema:
|
|||||||
)
|
)
|
||||||
fields.append(json_field)
|
fields.append(json_field)
|
||||||
|
|
||||||
# decode binary metadata to strings for JSON
|
return JsonArrowSchema(fields=fields, metadata=schema.metadata)
|
||||||
meta = None
|
|
||||||
if schema.metadata:
|
|
||||||
meta = {
|
|
||||||
k.decode("utf-8"): v.decode("utf-8") for k, v in schema.metadata.items()
|
|
||||||
}
|
|
||||||
|
|
||||||
return JsonArrowSchema(fields=fields, metadata=meta)
|
|
||||||
|
|
||||||
|
|
||||||
class LanceNamespaceStorageOptionsProvider(StorageOptionsProvider):
|
class LanceNamespaceStorageOptionsProvider(StorageOptionsProvider):
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import numpy as np
|
|||||||
import pyarrow as pa
|
import pyarrow as pa
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import pytest
|
import pytest
|
||||||
import pytest_asyncio
|
|
||||||
from utils import exception_output
|
from utils import exception_output
|
||||||
|
|
||||||
pytest.importorskip("lancedb.fts")
|
pytest.importorskip("lancedb.fts")
|
||||||
@@ -91,7 +90,7 @@ def table(tmp_path) -> ldb.table.LanceTable:
|
|||||||
return table
|
return table
|
||||||
|
|
||||||
|
|
||||||
@pytest_asyncio.fixture
|
@pytest.fixture
|
||||||
async def async_table(tmp_path) -> ldb.table.AsyncTable:
|
async def async_table(tmp_path) -> ldb.table.AsyncTable:
|
||||||
# Use local random state to avoid affecting other tests
|
# Use local random state to avoid affecting other tests
|
||||||
rng = np.random.RandomState(42)
|
rng = np.random.RandomState(42)
|
||||||
@@ -254,7 +253,7 @@ def test_search_fts(table, use_tantivy):
|
|||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_fts_select_async(async_table):
|
async def test_fts_select_async(async_table):
|
||||||
tbl = async_table
|
tbl = await async_table
|
||||||
await tbl.create_index("text", config=FTS())
|
await tbl.create_index("text", config=FTS())
|
||||||
await tbl.create_index("text2", config=FTS())
|
await tbl.create_index("text2", config=FTS())
|
||||||
results = (
|
results = (
|
||||||
@@ -339,6 +338,7 @@ def test_search_fts_phrase_query(table):
|
|||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_search_fts_phrase_query_async(async_table):
|
async def test_search_fts_phrase_query_async(async_table):
|
||||||
|
async_table = await async_table
|
||||||
await async_table.create_index("text", config=FTS(with_position=False))
|
await async_table.create_index("text", config=FTS(with_position=False))
|
||||||
try:
|
try:
|
||||||
phrase_results = (
|
phrase_results = (
|
||||||
@@ -393,6 +393,7 @@ def test_search_fts_specify_column(table):
|
|||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_search_fts_async(async_table):
|
async def test_search_fts_async(async_table):
|
||||||
|
async_table = await async_table
|
||||||
await async_table.create_index("text", config=FTS())
|
await async_table.create_index("text", config=FTS())
|
||||||
results = await async_table.query().nearest_to_text("puppy").limit(5).to_list()
|
results = await async_table.query().nearest_to_text("puppy").limit(5).to_list()
|
||||||
assert len(results) == 5
|
assert len(results) == 5
|
||||||
@@ -423,6 +424,7 @@ async def test_search_fts_async(async_table):
|
|||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_search_fts_specify_column_async(async_table):
|
async def test_search_fts_specify_column_async(async_table):
|
||||||
|
async_table = await async_table
|
||||||
await async_table.create_index("text", config=FTS())
|
await async_table.create_index("text", config=FTS())
|
||||||
await async_table.create_index("text2", config=FTS())
|
await async_table.create_index("text2", config=FTS())
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ all-tests: feature-tests remote-tests
|
|||||||
# the environment.
|
# the environment.
|
||||||
feature-tests:
|
feature-tests:
|
||||||
../../ci/run_with_docker_compose.sh \
|
../../ci/run_with_docker_compose.sh \
|
||||||
cargo test --all-features --tests --locked --examples $(CARGO_ARGS)
|
cargo test --all-features --tests --locked --examples
|
||||||
.PHONY: feature-tests
|
.PHONY: feature-tests
|
||||||
|
|
||||||
# Run tests against remote endpoints.
|
# Run tests against remote endpoints.
|
||||||
remote-tests:
|
remote-tests:
|
||||||
../../ci/run_with_test_connection.sh \
|
../../ci/run_with_test_connection.sh \
|
||||||
cargo test --features remote --locked $(CARGO_ARGS)
|
cargo test --features remote --locked
|
||||||
.PHONY: remote-tests
|
.PHONY: remote-tests
|
||||||
|
|||||||
@@ -1810,17 +1810,8 @@ impl NativeTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Helper to get num_sub_vectors with default calculation
|
// Helper to get num_sub_vectors with default calculation
|
||||||
fn get_num_sub_vectors(provided: Option<u32>, dim: u32, num_bits: Option<u32>) -> u32 {
|
fn get_num_sub_vectors(provided: Option<u32>, dim: u32) -> u32 {
|
||||||
if let Some(provided) = provided {
|
provided.unwrap_or_else(|| suggested_num_sub_vectors(dim))
|
||||||
return provided;
|
|
||||||
}
|
|
||||||
let suggested = suggested_num_sub_vectors(dim);
|
|
||||||
if num_bits.is_some_and(|num_bits| num_bits == 4) && suggested % 2 != 0 {
|
|
||||||
// num_sub_vectors must be even when 4 bits are used
|
|
||||||
suggested + 1
|
|
||||||
} else {
|
|
||||||
suggested
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper to extract vector dimension from field
|
// Helper to extract vector dimension from field
|
||||||
@@ -1843,7 +1834,7 @@ impl NativeTable {
|
|||||||
// Use IvfPq as the default for auto vector indices
|
// Use IvfPq as the default for auto vector indices
|
||||||
let dim = Self::get_vector_dimension(field)?;
|
let dim = Self::get_vector_dimension(field)?;
|
||||||
let ivf_params = lance_index::vector::ivf::IvfBuildParams::default();
|
let ivf_params = lance_index::vector::ivf::IvfBuildParams::default();
|
||||||
let num_sub_vectors = Self::get_num_sub_vectors(None, dim, None);
|
let num_sub_vectors = Self::get_num_sub_vectors(None, dim);
|
||||||
let pq_params =
|
let pq_params =
|
||||||
lance_index::vector::pq::PQBuildParams::new(num_sub_vectors as usize, 8);
|
lance_index::vector::pq::PQBuildParams::new(num_sub_vectors as usize, 8);
|
||||||
let lance_idx_params =
|
let lance_idx_params =
|
||||||
@@ -1910,8 +1901,7 @@ impl NativeTable {
|
|||||||
index.sample_rate,
|
index.sample_rate,
|
||||||
index.max_iterations,
|
index.max_iterations,
|
||||||
);
|
);
|
||||||
let num_sub_vectors =
|
let num_sub_vectors = Self::get_num_sub_vectors(index.num_sub_vectors, dim);
|
||||||
Self::get_num_sub_vectors(index.num_sub_vectors, dim, index.num_bits);
|
|
||||||
let num_bits = index.num_bits.unwrap_or(8) as usize;
|
let num_bits = index.num_bits.unwrap_or(8) as usize;
|
||||||
let mut pq_params = PQBuildParams::new(num_sub_vectors as usize, num_bits);
|
let mut pq_params = PQBuildParams::new(num_sub_vectors as usize, num_bits);
|
||||||
pq_params.max_iters = index.max_iterations as usize;
|
pq_params.max_iters = index.max_iterations as usize;
|
||||||
@@ -1947,8 +1937,7 @@ impl NativeTable {
|
|||||||
index.sample_rate,
|
index.sample_rate,
|
||||||
index.max_iterations,
|
index.max_iterations,
|
||||||
);
|
);
|
||||||
let num_sub_vectors =
|
let num_sub_vectors = Self::get_num_sub_vectors(index.num_sub_vectors, dim);
|
||||||
Self::get_num_sub_vectors(index.num_sub_vectors, dim, index.num_bits);
|
|
||||||
let hnsw_params = HnswBuildParams::default()
|
let hnsw_params = HnswBuildParams::default()
|
||||||
.num_edges(index.m as usize)
|
.num_edges(index.m as usize)
|
||||||
.ef_construction(index.ef_construction as usize);
|
.ef_construction(index.ef_construction as usize);
|
||||||
@@ -4133,8 +4122,6 @@ mod tests {
|
|||||||
table.prewarm_index("text_idx").await.unwrap();
|
table.prewarm_index("text_idx").await.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows does not support precise sleep durations due to timer resolution limitations.
|
|
||||||
#[cfg(not(target_os = "windows"))]
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_read_consistency_interval() {
|
async fn test_read_consistency_interval() {
|
||||||
let intervals = vec![
|
let intervals = vec![
|
||||||
|
|||||||
Reference in New Issue
Block a user