Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
3403fef
New approach: python only stream API.
alxmrs Jan 15, 2026
bac5d5f
Clever strategy: use a rust-implemented datafusion provider to read f…
alxmrs Jan 15, 2026
a875edb
CC Self-review. Applied lint. Using new method in the high level API …
alxmrs Jan 15, 2026
efb23fd
Fix DataFusion pushdown filters by using factory pattern for streams
claude Jan 16, 2026
d92c334
Simplify factory to return XarrayRecordBatchReader directly
claude Jan 16, 2026
74518b7
Apply pre-commit (pyink).
alxmrs Jan 18, 2026
bd2e20a
Pulling rust build items from other branch.
alxmrs Jan 18, 2026
2c4d3db
rust fmt
alxmrs Jan 18, 2026
e6c58e4
Add rust fmt to pre-commit.
alxmrs Jan 18, 2026
75ca76e
Don't use nightly fmt.
alxmrs Jan 18, 2026
93dcc51
Updated rust ci.
alxmrs Jan 18, 2026
f44906f
rm wrong classifiers.
alxmrs Jan 18, 2026
707eeeb
New release process using uv (recommended by maturin).
alxmrs Jan 18, 2026
2c288fe
Probably also need to install the rust toolchains to build.
alxmrs Jan 18, 2026
560c1d6
Updating release process to work with native code on pypi.
alxmrs Jan 18, 2026
449c036
remove unstable features.
alxmrs Jan 18, 2026
1206eb0
Better maturin CI
alxmrs Jan 18, 2026
fe48ecd
cross compile with zig.
alxmrs Jan 18, 2026
5ff0db4
we actually don't need this.
alxmrs Jan 18, 2026
cbe2d3e
Adding CI to test that it builds on other platforms.
alxmrs Jan 18, 2026
deecee3
reduce combinations.
alxmrs Jan 18, 2026
8a8ae22
rm comment.
alxmrs Jan 18, 2026
3dfb909
Reduce combinations.
alxmrs Jan 18, 2026
1e20edd
specify python version.
alxmrs Jan 18, 2026
55f182d
Better name
alxmrs Jan 18, 2026
9169d3b
Better python version
alxmrs Jan 18, 2026
93c88ed
platform target in test build CI name.
alxmrs Jan 18, 2026
202afc9
better name.
alxmrs Jan 18, 2026
5bd4dec
enabling uv cache in CI.
alxmrs Jan 18, 2026
26361bc
verbose sync for CI
alxmrs Jan 18, 2026
7584589
dropping python 3.9 support (RIP).
alxmrs Jan 18, 2026
b24f1ea
dropping python 3.9 support (RIP).
alxmrs Jan 18, 2026
7aa57b7
add rust cache to CI
alxmrs Jan 18, 2026
82f63e7
Need example data to create tests
alxmrs Jan 19, 2026
346297f
Make rust cache consistent.
alxmrs Jan 19, 2026
493cc28
rn int tests from old branch.
alxmrs Jan 19, 2026
45fc728
sccache enabled for all builds with rust.
alxmrs Jan 19, 2026
bfd5713
non-deprecated API.
alxmrs Jan 24, 2026
c779d72
Good catch from @maximedion2 in the native sources.
alxmrs Jan 24, 2026
2ba27a3
register_table_provider is not deprecated in this version of datafusi…
alxmrs Jan 24, 2026
6e19b40
upgrading datafusion version.
alxmrs Jan 24, 2026
ec76009
Cleaning up the API.
alxmrs Jan 24, 2026
2ea1135
Fixed issues related to datafusion upgrade.
alxmrs Jan 24, 2026
a2fd17a
fix pre-commit for rust. should be a fmt, not a check.
alxmrs Jan 24, 2026
e2fa418
rust lint.
alxmrs Jan 24, 2026
efc1dd2
Using newer python api given the datafusion upgrade.
alxmrs Jan 24, 2026
c9a1be2
pre-commit: filter rust files.
alxmrs Jan 24, 2026
2ffcdf9
Not using deprecated API in tests.
alxmrs Jan 25, 2026
7ac7a4d
Eliminated a test.
alxmrs Jan 25, 2026
12ccd66
Attempt to make the build faster.
alxmrs Jan 25, 2026
ddfe41f
fix build
alxmrs Jan 25, 2026
45acd3f
revert install in ci
alxmrs Jan 25, 2026
862a512
we still want verbose
alxmrs Jan 25, 2026
600cbf0
trying import hook. thanks
alxmrs Jan 25, 2026
a4c1230
better system (inspired by datafusion-python).
alxmrs Jan 25, 2026
bd06611
new ideas to make the build faster from datafusion-python.
alxmrs Jan 25, 2026
ac3fcf8
adding cargo cache to ci build.
alxmrs Jan 25, 2026
723de14
env aware cargo cache.
alxmrs Jan 25, 2026
de549eb
better build to take advantage of caches.
alxmrs Jan 25, 2026
ebb2d38
rm --uv flag for build.
alxmrs Jan 25, 2026
0be5c38
more accurate year.
alxmrs Jan 25, 2026
1d0dc2b
fix minor typo in readme.
alxmrs Jan 25, 2026
8f8abc2
Upgrade `read_xarray` instead of deprecating. Use new reader function…
alxmrs Jan 25, 2026
31e5da9
error prop
alxmrs Jan 25, 2026
1dccd88
True streaming implementation.
alxmrs Jan 25, 2026
87d2597
attempt to fix rust pre-commit.
alxmrs Jan 25, 2026
5739e1d
rust fmt
alxmrs Jan 25, 2026
3e5ea89
revert
alxmrs Jan 25, 2026
b5cbe40
experiment: GIL-aware iterator reaching straddling rust and python.
alxmrs Jan 25, 2026
f1d19d7
Better streaming tests (WIP)
alxmrs Jan 25, 2026
3dd95af
Fix: use cstreams via record batches
alxmrs Jan 25, 2026
41c6138
Fixes to get most tests passing.
alxmrs Jan 26, 2026
e26dda5
Discovered issue with parallel execution. Workaround and filed a TODO.
alxmrs Jan 26, 2026
6886af8
try to fix clippy
alxmrs Jan 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: ci-build

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: "python ${{ matrix.platform.runner }}-${{ matrix.platform.target }} build"
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: windows-latest
target: x86
python_arch: x86
- runner: macos-latest
target: aarch64
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: x86_64
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Configure sccache
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

- name: Cache Cargo
uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ steps.rust-toolchain.outputs.cachekey }}-${{ matrix.platform.runner }}-${{ matrix.platform.target }}-${{ hashFiles('Cargo.lock') }}

- uses: astral-sh/setup-uv@v5
with:
python-version: 3.11
enable-cache: true

# Use the --no-install-package to only install the dependencies
# but do not yet build the rust library
- name: The project builds
run: |
uv sync --dev --no-install-package xarray-sql
uv run --no-project maturin build
59 changes: 59 additions & 0 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: ci-rust

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-test-all-features:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Configure sccache
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

- name: Clippy
run: cargo clippy --all-features --tests -- -D warnings

- name: Check
run: cargo check --all-features

- name: Test
run: cargo test --all-features

fmt:
name: Fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Fmt
run: cargo fmt -- --check --config imports_granularity=Module,group_imports=StdExternalCrate
31 changes: 26 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,40 @@ jobs:
fail-fast: false
matrix:
python-version: [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
]
steps:
- uses: actions/checkout@v4
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5

- uses: dtolnay/rust-toolchain@stable

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Configure sccache
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

- name: Cache Cargo
uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-cache-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('Cargo.lock') }}

- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

# Use the --no-install-package to only install the dependencies
# but do not yet build the rust library
- name: Install xarray_sql
run: uv sync --dev
run: uv sync --dev --no-install-package xarray-sql
- name: build rust
run: uv run --no-project maturin develop --uv
- name: Run unit tests
run: uv run pytest -m "not integration"
run: uv run --no-project pytest -v . -m "not integration"
180 changes: 138 additions & 42 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Taken from Xee and minimally modified: https://github.com/google/Xee/blob/main/.github/workflows/publish.yml
# Taken from Xee and modified: https://github.com/google/Xee/blob/main/.github/workflows/publish.yml
# Rust/maturin release adapted from https://github.com/apache/datafusion-python/blob/main/.github/workflows/build.yml
#
# Copyright 2023 Google LLC
#
Expand All @@ -13,85 +14,180 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Copyright 2022 Apache Software Foundation
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
name: Publish to PyPi

on:
release:
types: [published]

jobs:
build-artifacts:
runs-on: ubuntu-latest
build-artifacts-mac-win:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-latest, macos-15-intel, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2.3.1
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- uses: dtolnay/rust-toolchain@stable

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9

- name: Build tarball and wheels
- name: Configure sccache
run: |
git clean -xdf
git restore -SW .
python -m build --sdist --wheel .
- name: Check built artifacts
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Build wheels
run: |
python -m twine check dist/*
pwd
uv sync --dev --no-install-package xarray-sql
uv run --no-project maturin build --release --strip

- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
name: dist-${{ matrix.os }}
path: target/wheels/*

test-built-dist:
needs: build-artifacts
build-artifacts-manylinux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2.3.1
name: Install Python
- uses: actions/checkout@v4

- name: Build wheels for manylinux x86_64
uses: PyO3/maturin-action@v1
env:
RUST_BACKTRACE: 1
with:
rust-toolchain: stable
target: x86_64
manylinux: 2014
rustup-components: rust-std rustfmt
sccache: 'true'
args: --release

- uses: actions/upload-artifact@v4
with:
name: dist-manylinux-x86_64
path: target/wheels/*

build-artifacts-manylinux-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build wheels for manylinux arm64
uses: PyO3/maturin-action@v1
env:
RUST_BACKTRACE: 1
with:
python-version: 3.11
rust-toolchain: stable
target: aarch64
# Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
manylinux: 2_28
rustup-components: rust-std rustfmt
sccache: 'true'
args: --release

- uses: actions/upload-artifact@v4
with:
name: dist-manylinux-aarch64
path: target/wheels/*

build-sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
manylinux: auto
rustup-components: rust-std rustfmt
args: --release --sdist --out dist

- uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*

merge-build-artifacts:
runs-on: ubuntu-latest
needs:
- build-artifacts-mac-win
- build-artifacts-manylinux-x86_64
- build-artifacts-manylinux-arm64
- build-sdist
steps:
- name: Merge Build Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*

verify-built-dist:
needs: merge-build-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: releases
name: dist
path: dist

- name: List contents of built dist
run: |
ls -ltrh
ls -ltrh dist
- name: Publish package to TestPyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true
run: uv publish --token ${{ secrets.TESTPYPI_TOKEN }} --username __token__

- name: Check uploaded package
if: github.event_name == 'push'
run: |
sleep 3
python -m pip install --upgrade pip
python -m pip install --extra-index-url https://test.pypi.org/simple --upgrade de
uv pip install --extra-index-url https://test.pypi.org/simple --upgrade de
python -c "import xarray_sql; print(xarray_sql.__version__)"
upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
needs: verify-built-dist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: releases
name: dist
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0

- uses: astral-sh/setup-uv@v7
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true
enable-cache: true

- name: Publish package to PyPI
run: uv publish --token ${{ secrets.PYPI_TOKEN }} --username __token__
Loading
Loading