Import lifecycle models¶
biomero_schema.imports ¶
Versioned contracts for optional BIOMERO.importer lifecycle operations.
These models describe requests exchanged with the importer, and the
.biomero-import-storage.json record the importer persists about a result.
They deliberately do not implement storage mutation, conversion, or OMERO
registration.
ShallowZarrImportOperation ¶
ImportOptionsEnvelope ¶
ImportStorageModel ¶
Bases: ZarrContractModel
Base of the import-storage record shapes.
Unlike the other contracts this file has always used snake_case keys and
the key schema; both are kept so that existing files stay readable.
Fields are declared in the order the importer writes them.
RemoteImportStorageRecord ¶
Bases: ImportStorageModel
Record written after the importer validated a remote shallowing report.
Attributes:
| Name | Type | Description |
|---|---|---|
workflow_id |
UUID
|
The workflow the result belongs to. |
storage |
str
|
|
location |
str
|
Always |
decision_basis |
str | None
|
The reason in the remote report. Importer releases before v1.5.0-beta.12 did not write it. |
container |
str
|
Remote helper image. |
tool_version |
str
|
Shallower version of the remote helper. |
task_id |
str
|
Tracking task of the remote helper. |
job_id |
str | None
|
Slurm job of the helper, null when unknown. |
report_sha256 |
str
|
Checksum of the remote report. |
ImporterShallowImportStorageRecord ¶
Bases: ImportStorageModel
Record written after the importer shallowed the result itself.
Attributes:
| Name | Type | Description |
|---|---|---|
storage |
str
|
Always |
location |
str
|
Always |
tool_version |
str
|
Shallower version that handled the result. |
decision_basis |
str | None
|
Why the result was shallowed. Importer releases before v1.5.0-beta.12 did not write it. |
ImporterFullImportStorageRecord ¶
Bases: ImportStorageModel
Record written after the importer kept the full result.
Attributes:
| Name | Type | Description |
|---|---|---|
storage |
str
|
Always |
location |
str
|
Always |
tool_version |
str
|
Shallower version that handled the result. |
reason |
str
|
Why the full result was kept. |
parse_import_options ¶
parse_import_options(value: ImportOptionsEnvelope | ZarrImportOptions | Mapping[str, Any] | None) -> ImportOptionsEnvelope
Parse current options and upcast legacy flat registration options.
parse_import_storage_record ¶
parse_import_storage_record(value: Mapping[str, Any]) -> RemoteImportStorageRecord | ImporterFullImportStorageRecord | ImporterShallowImportStorageRecord
Validate the content of a .biomero-import-storage.json file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Mapping[str, Any]
|
The parsed JSON object. |
required |
Returns:
| Type | Description |
|---|---|
RemoteImportStorageRecord | ImporterFullImportStorageRecord | ImporterShallowImportStorageRecord
|
RemoteImportStorageRecord | ImporterFullImportStorageRecord | ImporterShallowImportStorageRecord: The record of its shape. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the value matches no shape. |