metadata_schema
Scan Metadata Schema ModuleLink
Defines the canonical MIAPPE-aligned structure for the biological metadata of a
Scan and a lightweight validator that checks it (no external dependency).
The biological metadata lives in the scan's metadata/metadata.json under the
top-level MIAPPE sections: investigation, study, biologicalMaterial
and observedVariable. The validator only inspects these keys when present:
a scan without biological metadata is valid (the block is optional), but if a
section is provided its known fields are type-checked.
See docs/developers/miappe_metadata.md for the full mapping and design.
validate_biological_metadata
Link
validate_biological_metadata(metadata)
Validate the MIAPPE biological block of metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
dict
|
The scan metadata dictionary. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a present MIAPPE section contains a field of the wrong type. |
Source code in plantdb/commons/fsdb/metadata_schema.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |