Skip to content

Commit

Permalink
re-enable python ci (#273)
Browse files Browse the repository at this point in the history
* re-enable python ci

* fix dir

* fmt
  • Loading branch information
kylebarron authored Nov 22, 2023
1 parent 8d56f57 commit f435999
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 109 deletions.
214 changes: 107 additions & 107 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,107 +1,107 @@
# name: Python

# on:
# push:
# branches:
# - main
# pull_request:

# jobs:
# lint-test:
# name: Lint and Test
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: python/geoarrow-rust

# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"

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

# - uses: Swatinem/rust-cache@v2

# - name: Cargo fmt
# run: cargo fmt --all -- --check

# # Note not sure why this is needed
# - name: Install protobuf
# run: |
# sudo apt-get install libprotobuf-dev protobuf-compiler

# # Don't use --all-features as we don't have GDAL 3.6 available in CI
# - name: "clippy --all"
# run: cargo clippy --all --tests -- -D warnings

# - name: "cargo check"
# run: cargo check --all

# - name: "cargo test"
# run: |
# cargo test --all

# # lint-python:
# # name: Lint Python code
# # runs-on: ubuntu-latest
# # steps:
# # - uses: actions/checkout@v3

# # - name: Set up Python 3.8
# # uses: actions/setup-python@v2
# # with:
# # python-version: "3.8"

# # - name: run pre-commit
# # run: |
# # python -m pip install pre-commit
# # pre-commit run --all-files

# test-python:
# name: Build and test Python
# runs-on: ubuntu-latest
# strategy:
# fail-fast: true
# matrix:
# python-version: ["3.8", "3.11"]
# defaults:
# run:
# working-directory: python/geoarrow-rust

# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"

# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable

# - uses: Swatinem/rust-cache@v2

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

# - name: Install dependencies
# run: |
# pip install maturin

# - name: Build python package
# run: |
# maturin build

# # - name: Run type checking
# # run: |
# # poetry run mypy --config-file pyproject.toml

# # - name: Run tests
# # env:
# # RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
# # run: |
# # poetry run maturin develop
# # poetry run pytest tests/unit
name: Python

on:
push:
branches:
- main
pull_request:

jobs:
lint-test:
name: Lint and Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: python/core

steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

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

- uses: Swatinem/rust-cache@v2

- name: Cargo fmt
run: cargo fmt --all -- --check

# # Note not sure why this is needed
# - name: Install protobuf
# run: |
# sudo apt-get install libprotobuf-dev protobuf-compiler

# Don't use --all-features as we don't have GDAL 3.6 available in CI
- name: "clippy --all"
run: cargo clippy --all --tests -- -D warnings

- name: "cargo check"
run: cargo check --all

- name: "cargo test"
run: |
cargo test --all
# lint-python:
# name: Lint Python code
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Set up Python 3.8
# uses: actions/setup-python@v2
# with:
# python-version: "3.8"

# - name: run pre-commit
# run: |
# python -m pip install pre-commit
# pre-commit run --all-files

test-python:
name: Build and test Python
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.11"]
defaults:
run:
working-directory: python/core

steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

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

- uses: Swatinem/rust-cache@v2

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

- name: Install dependencies
run: |
pip install maturin
- name: Build python package
run: |
maturin build
# - name: Run type checking
# run: |
# poetry run mypy --config-file pyproject.toml

# - name: Run tests
# env:
# RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
# run: |
# poetry run maturin develop
# poetry run pytest tests/unit
1 change: 0 additions & 1 deletion python/core/src/array/linestring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ impl From<LineStringArray> for geoarrow::array::LineStringArray<i32> {
value.0
}
}

1 change: 0 additions & 1 deletion python/core/src/array/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ impl From<PointArray> for geoarrow::array::PointArray {
value.0
}
}

0 comments on commit f435999

Please sign in to comment.