h5coro-hidefix 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- h5coro_hidefix-0.1.0/.github/workflows/ci.yml +29 -0
- h5coro_hidefix-0.1.0/.github/workflows/wheels.yml +91 -0
- h5coro_hidefix-0.1.0/.gitignore +12 -0
- h5coro_hidefix-0.1.0/Cargo.lock +1200 -0
- h5coro_hidefix-0.1.0/Cargo.toml +35 -0
- h5coro_hidefix-0.1.0/LICENSE +21 -0
- h5coro_hidefix-0.1.0/PKG-INFO +230 -0
- h5coro_hidefix-0.1.0/README.md +208 -0
- h5coro_hidefix-0.1.0/pyproject.toml +33 -0
- h5coro_hidefix-0.1.0/src/lib.rs +971 -0
- h5coro_hidefix-0.1.0/tests/conftest.py +65 -0
- h5coro_hidefix-0.1.0/tests/test_hermetic.py +454 -0
- h5coro_hidefix-0.1.0/tests/test_local_granules.py +148 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest, macos-14]
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
21
|
+
- uses: Swatinem/rust-cache@v2
|
|
22
|
+
- name: Rust lint
|
|
23
|
+
run: |
|
|
24
|
+
cargo fmt --check
|
|
25
|
+
cargo clippy --locked -- -D warnings
|
|
26
|
+
- name: Build and install (compiles bundled static libhdf5; needs cmake)
|
|
27
|
+
run: pip install -v ".[test]"
|
|
28
|
+
- name: Hermetic tests
|
|
29
|
+
run: pytest tests/test_hermetic.py -v
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["*"]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
linux:
|
|
14
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
platform:
|
|
19
|
+
- runner: ubuntu-latest
|
|
20
|
+
target: x86_64
|
|
21
|
+
- runner: ubuntu-24.04-arm # native arm64 runner, no QEMU
|
|
22
|
+
target: aarch64
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: PyO3/maturin-action@v1
|
|
26
|
+
with:
|
|
27
|
+
target: ${{ matrix.platform.target }}
|
|
28
|
+
args: --release --out dist --locked
|
|
29
|
+
manylinux: "2_28"
|
|
30
|
+
# hidefix's "static" feature compiles and bundles libhdf5
|
|
31
|
+
# (hdf5-metno-src), which needs cmake inside the manylinux image.
|
|
32
|
+
before-script-linux: dnf install -y cmake
|
|
33
|
+
- name: Smoke-test wheel
|
|
34
|
+
run: |
|
|
35
|
+
python3 -m venv venv
|
|
36
|
+
venv/bin/pip install dist/*.whl pytest h5py numpy
|
|
37
|
+
venv/bin/python -m pytest tests/test_hermetic.py -v
|
|
38
|
+
- uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
41
|
+
path: dist
|
|
42
|
+
|
|
43
|
+
macos:
|
|
44
|
+
runs-on: macos-14
|
|
45
|
+
steps:
|
|
46
|
+
- uses: actions/checkout@v4
|
|
47
|
+
- uses: PyO3/maturin-action@v1
|
|
48
|
+
with:
|
|
49
|
+
target: aarch64-apple-darwin
|
|
50
|
+
args: --release --out dist --locked
|
|
51
|
+
- name: Smoke-test wheel
|
|
52
|
+
run: |
|
|
53
|
+
python3 -m venv venv
|
|
54
|
+
venv/bin/pip install dist/*.whl pytest h5py numpy
|
|
55
|
+
venv/bin/python -m pytest tests/test_hermetic.py -v
|
|
56
|
+
- uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: wheels-macos-arm64
|
|
59
|
+
path: dist
|
|
60
|
+
|
|
61
|
+
sdist:
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
- uses: PyO3/maturin-action@v1
|
|
66
|
+
with:
|
|
67
|
+
command: sdist
|
|
68
|
+
args: --out dist
|
|
69
|
+
- uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: wheels-sdist
|
|
72
|
+
path: dist
|
|
73
|
+
|
|
74
|
+
# PyPI publish via Trusted Publishing (no secret in this repo). The
|
|
75
|
+
# `h5coro-hidefix` name is not registered on PyPI yet, and the first
|
|
76
|
+
# release is additionally gated on the upstream hidefix license
|
|
77
|
+
# clarification (see README) -- until both are resolved this job simply
|
|
78
|
+
# fails harmlessly on tag pushes.
|
|
79
|
+
publish:
|
|
80
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
81
|
+
needs: [linux, macos, sdist]
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
environment: pypi
|
|
84
|
+
permissions:
|
|
85
|
+
id-token: write
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
path: dist
|
|
90
|
+
merge-multiple: true
|
|
91
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|