Restore support for `H5S_NUL` shape

#467 · closed · 1 comments

View on GitHub ↗

axelboc

HSDS v0.9 used to support datasets with a [null shape](https://support.hdfgroup.org/documentation/hdf5/latest/_h5_spublic_8h.html#ae53f3c6a52563646fbac9ead8ecdbf0a), but HSDS v1 doesn't seem to any more: - The `/datasets/{id}` and `datatypes/{id}` endpoints used to return `shape: { class: 'H5S_NUL' }` but they now return `shape: { class: 'H5S_SCALAR' }`. - The `/datasets/{id}/value` endpoint used to return `null` but it now returns a scalar value. H5Web's [`sample-hsds.h5`](https://www.silx.org/pub/h5web/sample-hsds.h5) file contains three datasets with an empty shape: [`ascii_vlen_empty`](https://github.com/silx-kit/h5web/blob/main/packages/app/src/providers/hsds/__snapshots__/hsds-api.test.ts.snap#L42), [`bool_empty`](https://github.com/silx-kit/h5web/blob/main/packages/app/src/providers/hsds/__snapshots__/hsds-api.test.ts.snap#L141) and [`float32_empty`](https://github.com/silx-kit/h5web/blob/main/packages/app/src/providers/hsds/__snapshots__/hsds-api.test.ts.snap#L1042) that demonstrate the issue.

Comments

mattjala

It looks like the root cause for this lies within h5pyd not providing a `shape` to HSDS for null shapes - see HDFGroup/h5pyd#303