BIOMERO Schema
Shared, versioned Pydantic contracts for the BIOMERO ecosystem.
Documentation · Python API · Pixel identity reference
The package keeps two contract areas separate:
biomero_schema.modelsis BIOMERO's normalized representation of a workflow descriptor.biomero_schema.zarrandbiomero_schema.importsdefine internal cross-service contracts for managed Zarr sources, pixel identity, shallow collections, and importer lifecycle operations.
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 inspired by OME-NGFF RFC 8. They are not a replacement for OME-NGFF Collections and are not requirements for third-party workflows.
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.
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 biomero_schema-0.2.tar.gz.
File metadata
- Download URL: biomero_schema-0.2.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
414d2d7e3610264f9e363a22ebb946cf1ff40eab05749340d6f4e6506af64477
|
|
| MD5 |
10fade7bb21abfe638a83cd46ea28b94
|
|
| BLAKE2b-256 |
11d7e1a805c04fc56247474cb8d63396034fd0257eaf391b58dc4b29722e2186
|
File details
Details for the file biomero_schema-0.2-py3-none-any.whl.
File metadata
- Download URL: biomero_schema-0.2-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbf6ea42ba3bf10908b5eb751b535588d5b657363db49402eeb51001ddcce475
|
|
| MD5 |
22b2b8ae2465a44516df405ff037644e
|
|
| BLAKE2b-256 |
da9448b781b1a7eef165b9dcd659519ec46ba95ddc509c6ae66ddde98bff3396
|