mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-22 21:09:58 +00:00
Exposes `storage_options` in LanceDB. This is provided for Python async, Node `lancedb`, and Node `vectordb` (and Rust of course). Python synchronous is omitted because it's not compatible with the PyArrow filesystems we use there currently. In the future, we will move the sync API to wrap the async one, and then it will get support for `storage_options`. 1. Fixes #1168 2. Closes #1165 3. Closes #1082 4. Closes #439 5. Closes #897 6. Closes #642 7. Closes #281 8. Closes #114 9. Closes #990 10. Deprecating `awsCredentials` and `awsRegion`. Users are encouraged to use `storageOptions` instead.
196 lines
4.9 KiB
YAML
196 lines
4.9 KiB
YAML
name: Python
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths:
|
|
- python/**
|
|
- .github/workflows/python.yml
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: "Lint"
|
|
timeout-minutes: 30
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Install ruff
|
|
run: |
|
|
pip install ruff==0.2.2
|
|
- name: Format check
|
|
run: ruff format --check .
|
|
- name: Lint
|
|
run: ruff .
|
|
doctest:
|
|
name: "Doctest"
|
|
timeout-minutes: 30
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: "pip"
|
|
- name: Install protobuf
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y protobuf-compiler
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: python
|
|
- name: Install
|
|
run: |
|
|
pip install -e .[tests,dev,embeddings]
|
|
pip install tantivy
|
|
pip install mlx
|
|
- name: Doctest
|
|
run: pytest --doctest-modules python/lancedb
|
|
linux:
|
|
name: "Linux: python-3.${{ matrix.python-minor-version }}"
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
python-minor-version: ["8", "11"]
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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@v5
|
|
with:
|
|
python-version: 3.${{ matrix.python-minor-version }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: python
|
|
- uses: ./.github/workflows/build_linux_wheel
|
|
- uses: ./.github/workflows/run_tests
|
|
with:
|
|
integration: true
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
platform:
|
|
name: "Mac: ${{ matrix.config.name }}"
|
|
timeout-minutes: 30
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- name: x86
|
|
runner: macos-13
|
|
- name: Arm
|
|
runner: macos-14
|
|
runs-on: "${{ matrix.config.runner }}"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: python
|
|
- uses: ./.github/workflows/build_mac_wheel
|
|
- 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: 30
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- name: x86
|
|
runner: windows-latest
|
|
runs-on: "${{ matrix.config.runner }}"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
lfs: true
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: python
|
|
- uses: ./.github/workflows/build_windows_wheel
|
|
- uses: ./.github/workflows/run_tests
|
|
# Make sure wheels are not included in the Rust cache
|
|
- name: Delete wheels
|
|
run: rm -rf target/wheels
|
|
pydantic1x:
|
|
timeout-minutes: 30
|
|
runs-on: "ubuntu-22.04"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
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@v5
|
|
with:
|
|
python-version: 3.9
|
|
- name: Install lancedb
|
|
run: |
|
|
pip install "pydantic<2"
|
|
pip install -e .[tests]
|
|
pip install tantivy
|
|
- name: Run tests
|
|
run: pytest -m "not slow and not s3_test" -x -v --durations=30 python/tests
|