Skip to main content
Pre-release

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

BIOMERO BIOMERO Schema

Tests Documentation PyPI License: Apache 2.0

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

Shared, versioned Pydantic contracts for the BIOMERO ecosystem.

Documentation · Python API · Pixel identity reference

The package keeps two contract areas separate:

  • biomero_schema.models is BIOMERO's normalized representation of a workflow descriptor.
  • biomero_schema.zarr, biomero_schema.imports, and biomero_schema.shallower define internal cross-service contracts for managed Zarr sources, pixel identity, shallow collections, importer lifecycle operations, and remote normalization reports and receipts.

Workflow descriptors

Workflow providers normally describe their tools using an external workflow format. The biomero runtime detects and converts supported formats into the validated WorkflowSchema from this package:

BIAFLOWS descriptor.json ─┐
                         ├─> biomero adapters ─> WorkflowSchema ─> BIOMERO services
BILAYERS config.yaml ─────┘

Currently supported inputs are:

Provider format BIOMERO support
BILAYERS config.yaml Converts the container, command, citations, inputs, parameters, and declared outputs. This is the preferred route for Zarr-to-Zarr and Plate-aware workflows.
BIAFLOWS/Cytomine descriptor Converts the supported legacy cytomine-0.1 subset. It remains useful for established TIFF-oriented BIAFLOWS workflows.
Native biomero-0.1 descriptor Validates directly. This is primarily BIOMERO's normalized service representation, although integrations may produce it explicitly.

CWL and OpenAPI descriptors are not yet supported. The adapters are maintained in biomero.schema_parsers, not in this schema package. This repository therefore documents what the normalized model can represent; the adapter determines which fields from an external format are currently converted.

See Workflow descriptors for the conversion boundary and supported mappings.

Installation

Python 3.11 or newer is required.

pip install biomero-schema

For development:

git clone https://github.com/NL-BioImaging/biomero-schema.git
cd biomero-schema
pip install -e .

The repository also supports Pixi:

pixi run test

Native descriptor validation

The CLI validates the normalized BIOMERO descriptor. Conversion of BILAYERS or BIAFLOWS descriptors is performed by the biomero runtime before validation.

biomero-schema validate descriptor.json
biomero-schema parse descriptor.json
biomero-schema parse descriptor.json --pretty
biomero-schema schema

A maintained native example is available at tests/example_workflow.json.

Cross-service contracts

Consumers should import the shared models rather than duplicating JSON fields:

from biomero_schema.zarr import CanonicalZarrSource

source = CanonicalZarrSource.from_dict(payload)
wire_payload = source.to_dict()
json_schema = CanonicalZarrSource.model_json_schema()

The camelCase output from to_dict() is the stable wire representation. Every contract family carries its own integer schema, independently of the workflow descriptor version.

The shallow-Zarr contracts are experimental BIOMERO storage contracts. Their scientific collection graph is kept separate from BIOMERO storage, identity and workflow bindings so that an accepted OME-NGFF Collections representation can replace the private serialization later. The current manifest is not RFC-8 metadata and is not a requirement for third-party workflows.

See Remote shallower contracts for the report formats, trusted receipt hand-off, and compatibility requirements. These models do not enable shallow storage or remote execution; feature configuration belongs to the consuming services.

Documentation development

python -m pip install -e .
python -m pip install -r docs/requirements.txt
mkdocs serve

Use mkdocs build --strict to reproduce the documentation CI build. See docs/contributing.md for publishing details.

Metadata

Release files for biomero-schema 0.3.0b1

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-schema 0.3.0b1
File Size Uploaded Provenance Actions
biomero_schema-0.3.0b1.tar.gz 65.2 kB Without provenance Details for biomero_schema-0.3.0b1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for biomero-schema 0.3.0b1
File Interpreter ABI Platform Actions
biomero_schema-0.3.0b1-py3-none-any.whl Python 3 none any Details for biomero_schema-0.3.0b1-py3-none-any.whl

Total release size: 89.7 kB

Release files / biomero_schema-0.3.0b1.tar.gz

Download URL biomero_schema-0.3.0b1.tar.gz
Size 65.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1a5b9707644703d057d60f313341ddd2188dcb8a237158a1bc01d435433c762a
BLAKE2b-256 checksum
How to use checksums
7810c5a8751dd16798c126754ee4546c9e861453de71d185ad57059bd712a31f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / biomero_schema-0.3.0b1-py3-none-any.whl

Download URL biomero_schema-0.3.0b1-py3-none-any.whl
Size 24.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df6e228e53aa1530fef2eb41a13a081136375ff267222278f595a528945e11ce
BLAKE2b-256 checksum
How to use checksums
32cc8544eb2998e1de16057220900993f78bed4c34e3229f0f815ab376eb3719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for biomero-schema 0.3.0b1

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