Skip to content

Commit

Permalink
Merge branch 'main' into spark-integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco authored Aug 9, 2024
2 parents abc2664 + 8dd388f commit 1e1a12b
Show file tree
Hide file tree
Showing 364 changed files with 21,212 additions and 7,059 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
crates/ @wjones127 @roeap @rtyler
crates/ @wjones127 @roeap @rtyler @hntd187 @ion-elgreco
delta-inspect/ @wjones127 @rtyler
proofs/ @houqp
python/ @wjones127 @fvaleye @roeap @ion-elgreco
Expand Down
34 changes: 34 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
default: "3.10"

rust-toolchain:
description: "The Rust toolchain to set up"
required: true
default: "stable"

runs:
using: "composite"

steps:

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: ${{ inputs.rust-toolchain }}
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2
39 changes: 15 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main, "rust-v*"]
pull_request:
branches: [main, "rust-v*"]
merge_group:

jobs:
format:
Expand All @@ -28,7 +29,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-11
- windows-latest
runs-on: ${{ matrix.os }}

Expand All @@ -42,16 +42,14 @@ jobs:
toolchain: stable
override: true

- uses: Swatinem/rust-cache@v2

- name: build and lint with clippy
run: cargo clippy --features azure,datafusion,s3,gcs,glue --tests
run: cargo clippy --features azure,datafusion,s3,gcs,glue,hdfs --tests

- name: Spot-check build for native-tls features
run: cargo clippy --no-default-features --features azure,datafusion,s3-native-tls,gcs,glue --tests

- name: Check docs
run: cargo doc --features azure,datafusion,s3,gcs,glue
run: cargo doc --features azure,datafusion,s3,gcs,glue,hdfs

- name: Check no default features (except rustls)
run: cargo check --no-default-features --features rustls
Expand All @@ -62,7 +60,6 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-11
- windows-latest
runs-on: ${{ matrix.os }}
env:
Expand All @@ -82,8 +79,6 @@ jobs:
toolchain: "stable"
override: true

- uses: Swatinem/rust-cache@v2

- name: Run tests
run: cargo test --verbose --features datafusion,azure

Expand Down Expand Up @@ -118,28 +113,24 @@ jobs:
toolchain: stable
override: true

# - uses: actions/setup-java@v3
# with:
# distribution: "zulu"
# java-version: "17"

# - uses: beyondstorage/setup-hdfs@master
# with:
# hdfs-version: "3.3.2"

# - name: Set Hadoop env
# run: |
# echo "CLASSPATH=$CLASSPATH:`hadoop classpath --glob`" >> $GITHUB_ENV
# echo "LD_LIBRARY_PATH=$JAVA_HOME/lib/server" >> $GITHUB_ENV
# Install Java and Hadoop for HDFS integration tests
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"

- uses: Swatinem/rust-cache@v2
- name: Download Hadoop
run: |
wget -q https://dlcdn.apache.org/hadoop/common/hadoop-3.4.0/hadoop-3.4.0.tar.gz
tar -xf hadoop-3.4.0.tar.gz -C $GITHUB_WORKSPACE
echo "$GITHUB_WORKSPACE/hadoop-3.4.0/bin" >> $GITHUB_PATH
- name: Start emulated services
run: docker-compose up -d
run: docker compose up -d

- name: Run tests with rustls (default)
run: |
cargo test --features integration_test,azure,s3,gcs,datafusion
cargo test --features integration_test,azure,s3,gcs,datafusion,hdfs
- name: Run tests with native-tls
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: dev_pr

# Trigger whenever a PR is changed (title as well as new / changed commits)
on:
merge_group:
pull_request_target:
types:
- opened
Expand Down
25 changes: 7 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build (and maybe release) the documentation

on:
merge_group:
pull_request:
paths:
- python/**
Expand Down Expand Up @@ -31,9 +32,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: docs/src/python
- run: |
cd docs
make check
build-deploy:
needs:
Expand All @@ -47,25 +48,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Setup Environment
uses: ./.github/actions/setup-env

- name: Build and install deltalake
run: |
cd python
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
make ${{ env.BUILD_ARGS }}
Expand Down
95 changes: 23 additions & 72 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: python_build

on:
merge_group:
push:
branches: [main]
pull_request:
Expand All @@ -15,23 +16,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Setup Environment
uses: ./.github/actions/setup-env

- name: Check Python
run: |
pip install ruff black mypy types-dataclasses typing-extensions
python -m venv venv
source venv/bin/activate
pip install ruff==0.5.2 mypy==1.10.1 types-dataclasses typing-extensions
make check-python
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
override: true

- name: Check Rust
run: make check-rust

Expand All @@ -45,24 +40,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
- name: Setup Environment
uses: ./.github/actions/setup-env
with:
python-version: 3.8

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Build and install deltalake
run: |
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
make setup
# Install minimum PyArrow version
Expand All @@ -89,26 +74,15 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Environment
uses: ./.github/actions/setup-env

- name: Start emulated services
run: docker-compose up -d
run: docker compose up -d

- name: Build and install deltalake
run: |
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
make develop
Expand Down Expand Up @@ -137,23 +111,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Setup Environment
uses: ./.github/actions/setup-env

- name: Build deltalake in release mode
run: |
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
MATURIN_EXTRA_ARGS=--release make develop
Expand Down Expand Up @@ -187,18 +150,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Environment
uses: ./.github/actions/setup-env

- uses: actions/setup-java@v2
with:
Expand All @@ -207,8 +160,7 @@ jobs:

- name: Build and install deltalake
run: |
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
make develop-pyspark
Expand All @@ -231,15 +183,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Setup Environment
uses: ./.github/actions/setup-env
with:
python-version: ${{ matrix.python-version }}

- name: Build and install deltalake
run: |
pip install virtualenv
virtualenv venv
python -m venv venv
source venv/bin/activate
make setup
maturin develop
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
runs-on: macos-12
runs-on: macos-14
steps:
- uses: actions/checkout@v3

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tlaplus/*.toolbox/*/[0-9]*-[0-9]*-[0-9]*-[0-9]*-[0-9]*-[0-9]*/
/.idea
.vscode
.env
.venv
venv
**/.DS_Store
**/.python-version
.coverage
Expand All @@ -20,6 +22,7 @@ __blobstorage__
.githubchangeloggenerator.cache.log
.githubchangeloggenerator.cache/
.githubchangeloggenerator*
data

# Add all Cargo.lock files except for those in binary crates
Cargo.lock
Expand Down
Loading

0 comments on commit 1e1a12b

Please sign in to comment.