h5rs 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.
- h5rs-0.1.0/.github/workflows/ci.yml +30 -0
- h5rs-0.1.0/.github/workflows/release.yml +169 -0
- h5rs-0.1.0/.gitignore +7 -0
- h5rs-0.1.0/Cargo.lock +924 -0
- h5rs-0.1.0/Cargo.toml +40 -0
- h5rs-0.1.0/LICENSE +21 -0
- h5rs-0.1.0/PKG-INFO +300 -0
- h5rs-0.1.0/README.md +280 -0
- h5rs-0.1.0/RELEASE.md +63 -0
- h5rs-0.1.0/THIRD_PARTY_LICENSES.txt +4729 -0
- h5rs-0.1.0/benches/distance_50gb/benchmark.py +223 -0
- h5rs-0.1.0/benches/distance_50gb/generate.py +84 -0
- h5rs-0.1.0/benches/distance_50gb/large_tiles.py +102 -0
- h5rs-0.1.0/benches/distance_50gb/viewer.py +246 -0
- h5rs-0.1.0/benches/make_fixture.py +20 -0
- h5rs-0.1.0/benches/read_tiles.rs +91 -0
- h5rs-0.1.0/build.rs +11 -0
- h5rs-0.1.0/crates/h5rs-python/Cargo.toml +21 -0
- h5rs-0.1.0/crates/h5rs-python/src/lib.rs +163 -0
- h5rs-0.1.0/pyproject.toml +29 -0
- h5rs-0.1.0/python/h5rs/__init__.py +5 -0
- h5rs-0.1.0/src/error.rs +71 -0
- h5rs-0.1.0/src/filters.rs +84 -0
- h5rs-0.1.0/src/lib.rs +589 -0
- h5rs-0.1.0/src/metadata.rs +603 -0
- h5rs-0.1.0/src/pool.rs +115 -0
- h5rs-0.1.0/src/range_vfd.c +126 -0
- h5rs-0.1.0/src/raw.rs +169 -0
- h5rs-0.1.0/src/region.rs +162 -0
- h5rs-0.1.0/src/s3.rs +231 -0
- h5rs-0.1.0/tests/h5py_reference.rs +439 -0
- h5rs-0.1.0/tests/python_smoke.py +72 -0
- h5rs-0.1.0/tests/range_server.py +97 -0
- h5rs-0.1.0/tests/reference.py +125 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
strategy:
|
|
10
|
+
fail-fast: false
|
|
11
|
+
matrix:
|
|
12
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
16
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
17
|
+
with:
|
|
18
|
+
python-version: '3.12'
|
|
19
|
+
- name: Set up stable Rust
|
|
20
|
+
run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
|
|
21
|
+
- name: Install h5py reference dependencies
|
|
22
|
+
run: python -m pip install "h5py>=3.16,<4"
|
|
23
|
+
- name: Check formatting
|
|
24
|
+
run: cargo +stable fmt --all -- --check
|
|
25
|
+
- name: Lint
|
|
26
|
+
run: cargo +stable clippy --locked --workspace --all-targets --all-features -- -D warnings
|
|
27
|
+
- name: Run Rust and h5py tests
|
|
28
|
+
run: cargo +stable test --locked -- --include-ignored
|
|
29
|
+
- name: Test S3 ranges and SIMD Deflate
|
|
30
|
+
run: cargo +stable test --locked --all-features -- --include-ignored
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ['v*']
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
publish:
|
|
9
|
+
description: Publish this tag to PyPI and GitHub Releases
|
|
10
|
+
type: boolean
|
|
11
|
+
default: false
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: release-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
source:
|
|
22
|
+
runs-on: ubuntu-24.04
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
25
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.14'
|
|
28
|
+
- name: Verify release tag and package versions
|
|
29
|
+
shell: python
|
|
30
|
+
run: |
|
|
31
|
+
import os
|
|
32
|
+
from pathlib import Path
|
|
33
|
+
import tomllib
|
|
34
|
+
|
|
35
|
+
project = tomllib.loads(Path("pyproject.toml").read_text())["project"]
|
|
36
|
+
version = project["version"]
|
|
37
|
+
for manifest in ("Cargo.toml", "crates/h5rs-python/Cargo.toml"):
|
|
38
|
+
package = tomllib.loads(Path(manifest).read_text())["package"]
|
|
39
|
+
if package["version"] != version:
|
|
40
|
+
raise SystemExit(f"{manifest} must use version {version}")
|
|
41
|
+
expected_ref = f"refs/tags/v{version}"
|
|
42
|
+
if os.environ["GITHUB_REF"] != expected_ref:
|
|
43
|
+
raise SystemExit(f"Run this workflow on {expected_ref}")
|
|
44
|
+
- name: Build source distribution
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install "maturin==1.16.0" "cmake>=3.26" "h5py>=3.16,<4"
|
|
47
|
+
maturin sdist --out dist
|
|
48
|
+
python -m pip install --no-build-isolation dist/*.tar.gz
|
|
49
|
+
python tests/python_smoke.py
|
|
50
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
51
|
+
with:
|
|
52
|
+
name: dist-source
|
|
53
|
+
path: dist/*.tar.gz
|
|
54
|
+
if-no-files-found: error
|
|
55
|
+
|
|
56
|
+
wheels:
|
|
57
|
+
needs: source
|
|
58
|
+
strategy:
|
|
59
|
+
fail-fast: false
|
|
60
|
+
matrix:
|
|
61
|
+
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
|
|
62
|
+
platform:
|
|
63
|
+
- { runner: ubuntu-24.04, target: x86_64-unknown-linux-gnu }
|
|
64
|
+
- { runner: windows-2025, target: x86_64-pc-windows-msvc }
|
|
65
|
+
- { runner: macos-15, target: aarch64-apple-darwin }
|
|
66
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
69
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
70
|
+
with:
|
|
71
|
+
python-version: ${{ matrix.python }}
|
|
72
|
+
- name: Build manylinux wheel
|
|
73
|
+
if: runner.os == 'Linux'
|
|
74
|
+
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
75
|
+
with:
|
|
76
|
+
target: ${{ matrix.platform.target }}
|
|
77
|
+
maturin-version: v1.16.0
|
|
78
|
+
manylinux: '2_28'
|
|
79
|
+
before-script-linux: |
|
|
80
|
+
python_version='${{ matrix.python }}'
|
|
81
|
+
abi="cp${python_version/./}"
|
|
82
|
+
export PATH="/opt/python/$abi-$abi/bin:$PATH"
|
|
83
|
+
python${{ matrix.python }} -m pip install 'cmake>=3.26'
|
|
84
|
+
args: --release --locked --interpreter python${{ matrix.python }} --out dist
|
|
85
|
+
- name: Build native wheel
|
|
86
|
+
if: runner.os != 'Linux'
|
|
87
|
+
run: |
|
|
88
|
+
python -m pip install "maturin==1.16.0" "cmake>=3.26"
|
|
89
|
+
maturin build --release --locked --compatibility pypi --target ${{ matrix.platform.target }} --interpreter python --out dist
|
|
90
|
+
- name: Test installed wheel
|
|
91
|
+
shell: python
|
|
92
|
+
run: |
|
|
93
|
+
from pathlib import Path
|
|
94
|
+
import subprocess
|
|
95
|
+
import sys
|
|
96
|
+
|
|
97
|
+
wheel, = Path("dist").glob("h5rs-*.whl")
|
|
98
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", str(wheel), "h5py>=3.13,<4"])
|
|
99
|
+
subprocess.check_call([sys.executable, "tests/python_smoke.py"])
|
|
100
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
101
|
+
with:
|
|
102
|
+
name: dist-${{ matrix.platform.target }}-cp${{ matrix.python }}
|
|
103
|
+
path: dist/*.whl
|
|
104
|
+
if-no-files-found: error
|
|
105
|
+
|
|
106
|
+
verify:
|
|
107
|
+
needs: [source, wheels]
|
|
108
|
+
runs-on: ubuntu-24.04
|
|
109
|
+
steps:
|
|
110
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
111
|
+
with:
|
|
112
|
+
python-version: '3.14'
|
|
113
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
114
|
+
with:
|
|
115
|
+
pattern: dist-*
|
|
116
|
+
path: dist
|
|
117
|
+
merge-multiple: true
|
|
118
|
+
- run: |
|
|
119
|
+
python -m pip install twine
|
|
120
|
+
python -m twine check --strict dist/*
|
|
121
|
+
|
|
122
|
+
pypi:
|
|
123
|
+
if: github.event_name == 'workflow_dispatch' && inputs.publish
|
|
124
|
+
needs: verify
|
|
125
|
+
runs-on: ubuntu-24.04
|
|
126
|
+
environment: pypi
|
|
127
|
+
permissions:
|
|
128
|
+
id-token: write
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
131
|
+
with:
|
|
132
|
+
pattern: dist-*
|
|
133
|
+
path: dist
|
|
134
|
+
merge-multiple: true
|
|
135
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
136
|
+
with:
|
|
137
|
+
skip-existing: true
|
|
138
|
+
|
|
139
|
+
github:
|
|
140
|
+
if: github.event_name == 'workflow_dispatch' && inputs.publish
|
|
141
|
+
needs: pypi
|
|
142
|
+
runs-on: ubuntu-24.04
|
|
143
|
+
permissions:
|
|
144
|
+
contents: write
|
|
145
|
+
steps:
|
|
146
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
147
|
+
with:
|
|
148
|
+
pattern: dist-*
|
|
149
|
+
path: dist
|
|
150
|
+
merge-multiple: true
|
|
151
|
+
- name: Publish GitHub release
|
|
152
|
+
env:
|
|
153
|
+
GH_TOKEN: ${{ github.token }}
|
|
154
|
+
GH_REPO: ${{ github.repository }}
|
|
155
|
+
RELEASE_TAG: ${{ github.ref_name }}
|
|
156
|
+
run: |
|
|
157
|
+
if ! existing_assets=$(gh release view "$RELEASE_TAG" --json assets --jq '.assets[].name'); then
|
|
158
|
+
gh release create "$RELEASE_TAG" --verify-tag --generate-notes dist/*
|
|
159
|
+
exit
|
|
160
|
+
fi
|
|
161
|
+
missing=()
|
|
162
|
+
for asset in dist/*; do
|
|
163
|
+
if ! grep -Fxq -- "${asset##*/}" <<< "$existing_assets"; then
|
|
164
|
+
missing+=("$asset")
|
|
165
|
+
fi
|
|
166
|
+
done
|
|
167
|
+
if (( ${#missing[@]} )); then
|
|
168
|
+
gh release upload "$RELEASE_TAG" "${missing[@]}"
|
|
169
|
+
fi
|