ci: lint all targets, run interop suites for real, compile benches
- clippy --all-targets plus a clawhdf5-format feature matrix (parallel, lz4, zstd, pcodec, fast-checksum); fix the accumulated lint backlog in test, bench and feature-gated code (no behaviour changes). - Install python3 + h5py/numpy/netCDF4/xarray in the CI container and set CLAWHDF5_REQUIRE_INTEROP=1, which makes a missing interop dependency a test failure. Every h5py/netCDF4 interop test used to skip silently in CI. Run the #[ignore]d writer_h5py_tests suite explicitly. - cargo bench --no-run so benches can't rot; fix bench.rs and memory_bench.rs, which no longer compiled against the current strategy/consolidation APIs. - Optional fuzz smoke run via CLAWHDF5_FUZZ_SECONDS. - CHANGELOG and docs/known-issues.md updated. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
706189c3ef
commit
bbe1baa208
@@ -10,6 +10,12 @@ use clawhdf5_netcdf4::{AttrValue, NetCDF4File};
|
||||
// Helpers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// When `CLAWHDF5_REQUIRE_INTEROP=1` (set in CI), a missing Python dependency
|
||||
/// is a test failure instead of a silent skip.
|
||||
fn interop_required() -> bool {
|
||||
std::env::var("CLAWHDF5_REQUIRE_INTEROP").is_ok_and(|v| v == "1")
|
||||
}
|
||||
|
||||
fn netcdf4_python_available() -> bool {
|
||||
Command::new("python3")
|
||||
.args(["-c", "import netCDF4; print(netCDF4.__version__)"])
|
||||
@@ -29,6 +35,10 @@ fn xarray_available() -> bool {
|
||||
macro_rules! skip_if_no_netcdf4 {
|
||||
() => {
|
||||
if !netcdf4_python_available() {
|
||||
assert!(
|
||||
!interop_required(),
|
||||
"CLAWHDF5_REQUIRE_INTEROP=1 but python3 with netCDF4 is not available"
|
||||
);
|
||||
eprintln!("SKIP: python3 with netCDF4 not available");
|
||||
return;
|
||||
}
|
||||
@@ -38,6 +48,10 @@ macro_rules! skip_if_no_netcdf4 {
|
||||
macro_rules! skip_if_no_xarray {
|
||||
() => {
|
||||
if !xarray_available() {
|
||||
assert!(
|
||||
!interop_required(),
|
||||
"CLAWHDF5_REQUIRE_INTEROP=1 but python3 with xarray is not available"
|
||||
);
|
||||
eprintln!("SKIP: python3 with xarray not available");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user