Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

BIOMERO BIOMERO.shallower

Test and publish

🚀 This package is part of BIOMERO BIOMERO 2.0 — For complete deployment and FAIR infrastructure setup, start with the NL-BIOMERO Documentation 📖

A filesystem-only library and CPU container for shallow Zarr. It compares returned images and labels with the workflow's canonical inputs, replaces verified duplicate arrays with references, and retains new or changed data. No OMERO connection or credentials are required.

BIOMERO.importer uses the Python package locally. BIOMERO core runs the same implementation on Slurm before archiving and transferring results. Deduplication never suppresses result registration in OMERO.

The package writes the experimental BIOMERO shallow-manifest schema 2 for NGFF 0.4 / Zarr v2 and 0.5 / Zarr v3 Images and Plates. This private format is not RFC-8. Its portable image/label graph is separate from BIOMERO storage bindings so a future standards adapter can reuse it. Installing the package does not enable shallow storage; deployment configuration chooses local or remote shallowing.

Existing v2 stores remain v2. V3 stores keep their metadata, codecs and shards; normalization omits duplicate array directories without re-encoding pixels. Canonical and returned stores must use the same profile. Incompatible formats are rejected using root metadata and the canonical input snapshot, before field discovery or pixel identity computation. Full results are retained; the canonical store is unchanged. Unsupported versions, mixed-format image/label trees and consolidated v3 metadata are retained in full.

Quick start

Python 3.11 or newer:

pip install 'biomero-shallower[identity]'
biomero-shallower --version
biomero-shallower inspect --returned-zarr /results/result.zarr

Container:

docker run --rm --network none cellularimagingcf/biomero-shallower:0.1.0 health

Reconstruct a full Zarr

materialize_shallow_zarr can restore a standalone Image or Plate Zarr on disk, without an OMERO script or connection. In an NL-BIOMERO deployment, open Python:

docker compose exec biomeroworker /opt/omero/server/venv3/bin/python

Replace the example paths below with paths inside the container:

from pathlib import Path
from biomero_shallower.result_zarr import (
    load_managed_storage_roots,
    resolve_shallow_registration,
    materialize_shallow_zarr,
)

mount = Path("/data")
source = Path("/data/Project B/.analyzed/WORKFLOW/TIMESTAMP/result.ome.zarr")
destination = Path("/data/Project B/reconstructed-result.ome.zarr")
roots = load_managed_storage_roots(
    import_mount_path=mount,
    config_file="/opt/omero/server/biomero-config.json",
)
view = resolve_shallow_registration(
    source, storage_roots=roots, import_mount_path=mount,
)
if view is None:
    raise ValueError("No shallow collection found at the source path")
result = materialize_shallow_zarr(view.reference, destination, roots)
print(result.destination)

Use the whole result root for a Plate. The destination must not exist, its parent must be writable, and there must be space for the full result. Original stores remain unchanged. All referenced pixels and labels must be accessible. The configuration path shown is the demo worker's group mapping configuration; custom deployments must supply their own authoritative mappings, including group_mappings_file if maintained separately. Outside the container, the same Python API works with matching packages and storage mappings.

Upgrade prerelease schema-1 stores

Schema-1 shallow stores created by prerelease builds are not loaded implicitly. Upgrade a settled store explicitly:

biomero-shallower migrate-v1 --returned-zarr /results/result.ome.zarr

For standalone stores, this converts the sidecar, report, and image metadata and keeps a sibling backup. Do not run it during an active transfer or import. For stores registered in OMERO, use the administrator script BIOMERO Migrate Shallow Storage so the filesystem and OMERO references are updated together.

See the reconstruction guide for details. A shallow result itself is not a self-contained OME-Zarr for generic readers; the reconstructed output is.

Documentation

For local tests, install .[test] in a virtual environment and run python -m pytest tests -q. GitHub Actions runs unit tests, container smoke tests and a strict MkDocs build. GitHub releases publish the package and image.

License

Apache-2.0. See LICENSE. Dependencies retain their own licences.

Metadata

Release files for biomero-shallower 0.1.0b8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for biomero-shallower 0.1.0b8
File Size Uploaded Provenance Actions
biomero_shallower-0.1.0b8.tar.gz 61.6 kB Without provenance Details for biomero_shallower-0.1.0b8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biomero-shallower 0.1.0b8
File Interpreter ABI Platform Actions
biomero_shallower-0.1.0b8-py3-none-any.whl Python 3 none any Details for biomero_shallower-0.1.0b8-py3-none-any.whl

Total release size: 99.2 kB

Release files / biomero_shallower-0.1.0b8.tar.gz

Download URL biomero_shallower-0.1.0b8.tar.gz
Size 61.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c92393444d489d93324345ae53984231f4adebb92c21ebece65e70e6ffb5bc8e
BLAKE2b-256 checksum
How to use checksums
ba1300aa1a4505b8ec05e41bc729c093a0bd13a868d4271ad75ee28d407760cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / biomero_shallower-0.1.0b8-py3-none-any.whl

Download URL biomero_shallower-0.1.0b8-py3-none-any.whl
Size 37.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
586835842800d478b98f7245ebe3d9786c5a2328b22749e15ada8c6c1412dc23
BLAKE2b-256 checksum
How to use checksums
ffa93f38c64f7d46d52078ceb842102eef8296525f37fe235aa2eb2780c10a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for biomero-shallower 0.1.0b8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page