Installation

nirs4all-io requires Python 3.11+.

From PyPI

pip install nirs4all-io

The PyPI package is a self-contained wheel built from the Rust core (pyo3 binding). It ships numpy and pandas as its only runtime dependencies, so it can resolve, infer, configure and assemble datasets — and build the assembled structural summary — out of the box. The current wheel reads the CSV family of tabular inputs.

Note

By design nirs4all-io never decodes vendor bytes itself: reading vendor spectroscopy files (OPUS, JCAMP, ASD, …) is delegated to the nirs4all-formats reader library. That vendor-read path, and additional tabular backends, land with the broader load path — the published wheel currently handles the CSV family.

Materializing a SpectroDataset

nirs4all-io has no runtime dependency on nirs4all. The only touch-point is a lazy import of the SpectroDataset class when you call load(...) with target="spectrodataset". To get a real SpectroDataset, install nirs4all alongside:

pip install nirs4all

The default load(..., target="assembled") returns the assembled structural summary and needs no nirs4all install at all; target="spectrodataset" is the only path that imports nirs4all.

Development install

The repository also carries a pure-Python Phase-1 implementation under src/nirs4all_io/ that is kept as the dev / parity oracle (it is not the published wheel). To work on the library and run its test suite — which uses nirs4all and nirs4all-formats as read-only oracles — install it editable with its dev extras:

git clone https://github.com/GBeurier/nirs4all-io
cd nirs4all-io
pip install -e ".[dev]"

The published Python wheel is built from bindings/python with maturin:

pip install maturin
maturin develop -m bindings/python/Cargo.toml