Facility-side MARINERG-i data client: inspect, convert, validate, publish, and fetch marine test-facility datasets.
Project description
marinerg-data
Facility-side data client for the MARINERG-i e-infrastructure: inspect → convert → validate → publish, plus VRE consumption (search, resolve, fetch, lazy streaming). Django-free and pip-installable, so it runs both at a test facility and inside a Blue-Cloud / D4Science VRE Jupyter image.
The invariant that shapes everything: bulk data never transits the e-infrastructure. Facilities publish to their own Zenodo; this tool registers the record in CKAN; the server only re-validates metadata.
Install
pip install marinerg-data # core client (inspect/validate/publish)
pip install "marinerg-data[kerchunk]" # + kerchunk reference sidecars
pip install "marinerg-data[mock]" # + synthetic scenario generator
pip install "marinerg-data[vre]" # + complete Blue-Cloud / Jupyter runtime
pip install marinerg-wave-tank # optional wave-tank converter family
The lightweight core client supports Python 3.11 or newer and has no
notebook, NetCDF, or container dependency. kerchunk, mock, and vre are
explicit opt-ins. Windows is a supported installation target for the core
client; the release gate includes a Windows install-and-validate smoke test.
Commands
| Command | Purpose |
|---|---|
inspect <dir> |
Sniff capture formats, report converter families; --draft-manifest writes a skeleton |
convert <run-dir> |
Run a converter family (--family wave-tank, else auto-detect); writes open-format outputs + <run>.manifest.json, then validates. With [kerchunk], also emits a <file>.nc.kerchunk.json reference sidecar per NetCDF |
validate <manifest-or-dir> |
JSON Schema (run-manifest v0.1) + referential integrity + file existence; --verify-checksums, --no-files |
publish <bundle-dir> |
Facility Zenodo record + CKAN registration; --sandbox, --new-version, --dry-run |
fetch <doi> --cache <dir> |
Download a published dataset into a content-addressed shared cache (keyed by DOI + optional manifest checksum); first lab member pays the download, the rest hit the local copy. --from-ckan <name> --ckan-url <url> resolves the DOI via CKAN; --sandbox |
catalog --ckan-url <url> |
Generate an intake catalogue from CKAN so MARINERG-i datasets open natively in a VRE (intake.open_catalog(...) → .to_dask()); prefers kerchunk sidecars (lazy zarr) over direct NetCDF |
mock --scenario <name> |
Synthetic NetCDF + manifest for fixtures/seeding/demos (--scenario list) |
Environment: ZENODO_TOKEN (a sandbox token with --sandbox), CKAN_URL,
CKAN_TOKEN.
Cloud-optimised access (VRE)
With the [kerchunk] extra, convert emits a kerchunk reference sidecar per
NetCDF. The sidecar lets xarray lazily stream individual chunks straight from
Zenodo over HTTP range requests — open a 10 GB campaign, plot five minutes of one
gauge, transfer megabytes not gigabytes. The reference URL is templated ({{u}})
so the sidecar is portable; it is retargeted to the Zenodo file URL at publish.
Examples
Runnable VRE notebooks in examples/: lazy kerchunk streaming and
intake-based discovery, each self-contained against synthetic data. See
examples/README.md.
Blue-Cloud / D4Science handover
The operator-facing install profile, CKAN/DCAT endpoint contract, and live-demo
release checklist are in docs/blue-cloud-handover.md.
The VRE needs Python 3.11 or newer, outbound HTTPS to the MARINERG-i catalogue,
Zenodo, and PyPI, and persistent shared workspace storage. No MARINERG-i data
hosting, inbound connectivity, or identity federation is required for the
public-data workflow.
Develop
uv sync --group dev
uv run pytest # Django-free, no network (HTTP is faked)
uv run ruff check src tests
Development and CI use Python 3.14 with the uv-native toolchain; the published
client supports Python 3.11 or newer. See CLAUDE.md for architecture pointers
and the token-free release flow.
Licence
Copyright ICHEC. GNU AGPL v3 or later. Exemptions available for MARINERG-i project partners.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marinerg_data-0.2.0.tar.gz.
File metadata
- Download URL: marinerg_data-0.2.0.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f027c2dae42900c85c2a934f1c2fa21ff16a1548a0f25d84b631572e108c6ff2
|
|
| MD5 |
cdbfddb545b7fdc0b2cdc8ade68a2bb8
|
|
| BLAKE2b-256 |
f6a4e5094e097e99151a1918b4a9ef6974209ee546829735145ba24588c08205
|
File details
Details for the file marinerg_data-0.2.0-py3-none-any.whl.
File metadata
- Download URL: marinerg_data-0.2.0-py3-none-any.whl
- Upload date:
- Size: 53.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c9f01be430b048f92901a7e0deeab4996b0db5bcfd779d465729bec45a0c40b
|
|
| MD5 |
7d36c96c4754adfbb4883dc9bcbfef68
|
|
| BLAKE2b-256 |
b5adc45900842601835ee39672c86e09558b8d3f35d640fcdd731b49288ce2bb
|