nirs4all-core¶
nirs4all-core is the portable aggregate
distribution of the nirs4all
ecosystem. It is a thin portability layer that records the same upstream domain
map across Rust, Python, R, MATLAB/Octave, and JavaScript/WASM from one
canonical package surface - without becoming a second implementation of parsing,
datasets, ML orchestration, or numerical methods.
What it re-exports¶
nirs4all-core aggregates exactly six upstream libraries. Any real work is
delegated to those libraries when the current host language has a matching
runtime binding:
dag-ml— reproducible, OOF/leakage-safe ML coordinator.dag-ml-data— typed, sample-aligned multi-source data contracts.nirs4all-formats— Rust readers for NIRS/spectroscopy vendor file formats.nirs4all-io— dataset assembly bridge to aSpectroDataset.nirs4all-datasets— curated, DOI-pinned NIRS dataset catalog.nirs4all-methods— portable C-ABI PLS/NIRS numerical engine (libn4m).
Each binding records these upstream domains as formats, io, datasets,
methods, dag_ml, and dag_ml_data. Runtime loaders/proxies are only
executable where a real upstream package exists; otherwise the domain remains a
metadata-only row with an explicit unavailable-capability error.
Important
It only re-exports. nirs4all-core must never add a parser, estimator,
numerical kernel, dataset catalog, or DAG compiler of its own. The upstream
projects remain the single source of truth; this repository provides only a
canonical package surface, native bindings, release glue, and parity checks.
Package names¶
The Python distribution is named nirs4all-core and imports as
nirs4all_core so it does not collide with the full Python nirs4all library.
Every other binding uses nirs4all. This shared name is a packaging
convention, not a promise that each non-Python host has runtime bindings for
all six upstream domains.
Target |
External name |
Import / module name |
|---|---|---|
Python |
|
|
Rust |
|
|
JavaScript/WASM |
|
|
R |
|
|
MATLAB/Octave |
|
|
In Python the aggregate additionally exposes the additive, non-shadowing
brand facade n4a (import n4a; see Naming). It re-exports
nirs4all_core without adding behavior.
Note
This is the portable aggregate distribution. It is not nirs4all-web (the
standalone browser/WASM client) and not nirs4all-studio (the desktop/web
app). Those are separate projects that consume parts of this stack.
How the pieces fit¶
nirs4all-core is the seam where the low-level ecosystem becomes one portable
surface. The aggregate composes upstream domains — it does not reimplement them:
nirs4all-formats ─┐
nirs4all-io ──────┤
nirs4all-datasets ┤──► nirs4all-core ──► Python / Rust / R / MATLAB-Octave / JS-WASM
nirs4all-methods ─┤ (metadata/re-export surface,
dag-ml ───────────┤ parity gates, release glue,
dag-ml-data ──────┘ gated runtime delegates)
The portable pipeline subset (Kennard-Stone, SNV, Savitzky-Golay, and a PLS
component sweep) is parsed from the same JSON/YAML definition envelope used by
the full Python nirs4all, then executed through nirs4all-methods and compared
against the full Python nirs4all oracle in every binding. See
PARITY.md for the parity strategy and gates.
Getting started
The nirs4all ecosystem¶
Main Python modelling library — pipelines, SpectroDataset, predictions.
Rust readers for ~58 NIRS/spectroscopy file formats (re-exported).
Dataset-assembly bridge → SpectroDataset (re-exported).
Curated DOI-pinned NIRS dataset catalog (re-exported).
Portable C-ABI PLS/NIRS engine, libn4m (re-exported).
Reproducible, OOF/leakage-safe ML coordinator (re-exported).
Typed sample-aligned multi-source data contracts (re-exported).