Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
rtyler authored Dec 17, 2024
2 parents 47b9286 + a5d0097 commit 8288e7d
Show file tree
Hide file tree
Showing 139 changed files with 5,761 additions and 2,099 deletions.
13 changes: 10 additions & 3 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: "Setup Python and Rust Environment"
description: "Set up Python, virtual environment, and Rust toolchain"

inputs:

python-version:
description: "The Python version to set up"
required: true
Expand All @@ -17,7 +16,15 @@ runs:
using: "composite"

steps:

- name: checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "python/uv.lock"

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -31,4 +38,4 @@ runs:
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@v2
17 changes: 17 additions & 0 deletions .github/workflows/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0

name: DCO
on:
merge_group:

permissions: # set top-level default permissions as security best practice
contents: read # Check https://github.com/ossf/scorecard/blob/7ce8609469289d5f3b1bf5ee3122f42b4e3054fb/docs/checks.md#token-permissions

jobs:
DCO:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- run: echo "dummy DCO workflow (it won't run any check actually) to trigger by merge_group in order to enable merge queue"
5 changes: 1 addition & 4 deletions .github/workflows/python_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:

- name: Build deltalake in release mode
run: |
python -m venv venv
source venv/bin/activate
MATURIN_EXTRA_ARGS=--release make develop
# Download previous benchmark result from cache (if exists)
Expand All @@ -41,8 +39,7 @@ jobs:

- name: Run benchmark
run: |
source venv/bin/activate
pytest tests/test_benchmark.py -m benchmark --benchmark-json output.json
uv run pytest tests/test_benchmark.py -m benchmark --benchmark-json output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
Expand Down
53 changes: 16 additions & 37 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ jobs:

- name: Check Python
run: |
python -m venv venv
source venv/bin/activate
pip install ruff==0.5.2 mypy==1.10.1 types-dataclasses typing-extensions
uv pip install ruff==0.5.2 mypy==1.10.1 types-dataclasses typing-extensions --system
make check-python
- name: Check Rust
run: make check-rust

test-minimal:
name: Python Build (Python 3.8 PyArrow 16.0.0)
name: Python Build (Python 3.9 PyArrow 16.0.0)
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C debuginfo=line-tables-only"
Expand All @@ -43,22 +41,18 @@ jobs:
- name: Setup Environment
uses: ./.github/actions/setup-env
with:
python-version: 3.8
python-version: 3.9

- name: Build and install deltalake
run: |
python -m venv venv
source venv/bin/activate
make setup
# Install minimum PyArrow version
pip install -e .[pandas,devel] pyarrow==16.0.0
uv sync --extra devel --extra pandas
uv pip install pyarrow==16.0.0
env:
RUSTFLAGS: "-C debuginfo=line-tables-only"

- name: Run tests
run: |
source venv/bin/activate
make unit-test
run: make unit-test

test:
name: Python Build (Python 3.10 PyArrow latest)
Expand All @@ -77,25 +71,19 @@ jobs:
run: docker compose up -d

- name: Build and install deltalake
run: |
python -m venv venv
source venv/bin/activate
make develop
run: make develop

- name: Download Data Acceptance Tests (DAT) files
run: make setup-dat

- name: Run tests
run: |
source venv/bin/activate
python -m pytest -m '((s3 or azure) and integration) or not integration and not benchmark' --doctest-modules
run: uv run pytest -m '((s3 or azure) and integration) or not integration and not benchmark' --doctest-modules

- name: Test without pandas
run: |
source venv/bin/activate
pip uninstall --yes pandas
python -m pytest -m "not pandas and not integration and not benchmark"
pip install pandas
uv pip uninstall pandas
uv run pytest -m "not pandas and not integration and not benchmark"
uv pip install pandas
test-pyspark:
name: PySpark Integration Tests
Expand All @@ -116,15 +104,10 @@ jobs:
java-version: "11"

- name: Build and install deltalake
run: |
python -m venv venv
source venv/bin/activate
make develop-pyspark
run: make develop-pyspark

- name: Run tests
run: |
source venv/bin/activate
make test-pyspark
run: make test-pyspark

multi-python-running:
name: Running with Python ${{ matrix.python-version }}
Expand All @@ -135,7 +118,7 @@ jobs:

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -147,12 +130,8 @@ jobs:

- name: Build and install deltalake
run: |
python -m venv venv
source venv/bin/activate
make setup
maturin develop
uv sync
- name: Run deltalake
run: |
source venv/bin/activate
python -c 'import deltalake'
uv run python -c 'import deltalake'
Loading

0 comments on commit 8288e7d

Please sign in to comment.