Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
236b79f
test pypi workflow
terraputix Feb 28, 2025
5cb2c65
fix repository
terraputix Feb 28, 2025
cbdf78c
fix automatic run
terraputix Feb 28, 2025
53d3325
Merge branch 'main' into test-pypi
terraputix Mar 4, 2025
d44a161
relax dependencies and filter xr related warning in test
terraputix Mar 4, 2025
a4a6e97
python version matrix
terraputix Mar 4, 2025
87e5574
Merge branch 'main' into test-pypi
terraputix Mar 4, 2025
4451c4d
separate python version compatibility job
terraputix Mar 4, 2025
ab896f0
further relax dependencies
terraputix Mar 4, 2025
9b0e1d8
fix types for older python versions
terraputix Mar 4, 2025
d28e60b
fix type problems with annotations module
terraputix Mar 4, 2025
6c65d6e
revert change in types
terraputix Mar 4, 2025
a811932
fix types for older python versions
terraputix Mar 4, 2025
fbc3fee
update readme
terraputix Mar 4, 2025
a2c1fc6
test with minimum dependencies
terraputix Mar 4, 2025
817852c
update required numpy version
terraputix Mar 4, 2025
0eef9cb
separate action into multiple workflows
terraputix Mar 5, 2025
f1ea37c
potentially fix cache problem on musl
terraputix Mar 5, 2025
0b56a1b
install python dependencies with maturin develop and then run cargo t…
terraputix Mar 5, 2025
9f6e20d
explicitly install python dependencies
terraputix Mar 5, 2025
22f5998
fix musl
terraputix Mar 5, 2025
3cb8cca
cache rust and potentially fix test trigger
terraputix Mar 5, 2025
74580e9
master ci file again
terraputix Mar 5, 2025
3742908
remove yaml anchor
terraputix Mar 5, 2025
fc34f02
use composite actions instead where it makes sense
terraputix Mar 5, 2025
607a985
rename
terraputix Mar 5, 2025
20894da
remove pip cache
terraputix Mar 5, 2025
cee6929
cleanup
terraputix Mar 5, 2025
f6adb2f
version 0.0.1
terraputix Mar 5, 2025
64444b9
version 0.0.2
terraputix Mar 5, 2025
05f9be6
rename package
terraputix Mar 7, 2025
b643dd8
separate testing and publish workflows
terraputix Mar 7, 2025
826ce28
adapt workflow
terraputix Mar 7, 2025
f63c714
potentially fix workflow
terraputix Mar 7, 2025
696eabc
more links
terraputix Mar 7, 2025
46a563a
Merge branch 'main' into test-pypi
terraputix Mar 7, 2025
49a5981
fix publish
terraputix Mar 7, 2025
2299e93
cleanup publish
terraputix Mar 7, 2025
7df20a1
naming things is hard
terraputix Mar 7, 2025
d2786f1
update readme
terraputix Mar 7, 2025
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
71 changes: 71 additions & 0 deletions .github/actions/build_wheels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "Build Package"
description: "Build wheels for all platforms"

inputs:
python-version:
description: "Python version to use for building"
required: false
default: "3.12"
target:
description: "Target architecture"
required: true
manylinux:
description: "Manylinux version"
required: false
default: ""
is-musl:
description: "Whether this is a musl build"
required: false
default: "false"
before-script:
description: "Script to run before building"
required: false
default: ""
platform-name:
description: "Platform name for artifact identification"
required: true

runs:
using: "composite"
steps:
# Cache Rust build artifacts
- name: Cache Rust build
uses: actions/cache@v4
with:
path: |
target
key: ${{ runner.os }}-build-${{ inputs.platform-name }}-${{ hashFiles('**/Cargo.lock', 'src/**') }}
restore-keys: |
${{ runner.os }}-build-${{ inputs.platform-name }}-

- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: ${{ inputs.is-musl != 'true' && 'pip' || '' }}

# Install python dependencies to run cargo tests
- name: Install required python dependencies
if: ${{ inputs.is-musl != 'true' }}
run: pip install numpy fsspec s3fs xarray
shell: bash

- name: Run cargo tests
if: ${{ inputs.is-musl != 'true' }}
run: cargo test --no-default-features
shell: bash

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ inputs.target }}
args: --release --out dist --find-interpreter
sccache: "true"
manylinux: ${{ inputs.manylinux }}
container: ${{ inputs.is-musl == 'true' && 'off' || '' }}
before-script-linux: ${{ inputs.before-script }}

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ inputs.platform-name }}
path: dist
40 changes: 0 additions & 40 deletions .github/actions/run-tests/action.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "Test Package"
description: "Run tests on built wheels"

inputs:
python-version:
description: "Python version to use for testing"
required: false
default: "3.12"
is-musl:
description: "Whether this is a musl build"
required: false
default: "false"
test-type:
description: "Type of test to run (standard or min_deps)"
required: false
default: "standard"
platform-name:
description: "Platform name for artifact identification"
required: true

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Download wheels
uses: actions/download-artifact@v4
with:
name: wheels-${{ inputs.platform-name }}
path: dist

# Regular tests (non-musl platforms)
- name: Run regular tests
if: ${{ inputs.test-type == 'standard' && inputs.is-musl != 'true' }}
run: |
python -m pip install pytest
WHEEL_PATH=$(ls dist/*.whl)
python -m pip install --force-reinstall "$WHEEL_PATH"
pytest tests/
shell: bash

# Musl tests
- name: Run musl tests
if: ${{ inputs.test-type == 'standard' && inputs.is-musl == 'true' }}
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add python3 py3-pip
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
WHEEL_PATH=$(ls dist/*.whl)
pip install --force-reinstall "$WHEEL_PATH"
pip install pytest
pytest tests/

# Minimum dependencies test
- name: Run tests with minimum dependencies
if: ${{ inputs.test-type == 'min_deps' }}
run: |
python -m pip install pytest==6.0
WHEEL_PATH=$(ls dist/*.whl)
python -m pip install --force-reinstall "$WHEEL_PATH" \
"numpy==1.20.0" \
"fsspec==2023.1.0" \
"s3fs==2023.1.0" \
"xarray==2023.1.0"
pytest tests/ -v
shell: bash
130 changes: 0 additions & 130 deletions .github/workflows/CI.yml

This file was deleted.

Loading