validate
cli.validate
tvbo validate — sub-tree of validators (schema today; OMEX/SED-ML/BIDS later).
Attributes
| Name | Description |
|---|---|
| app |
Functions
| Name | Description |
|---|---|
| all_ | Recursively run validate schema on every YAML file under directory matching pattern. |
| bids | Validate a BIDS dataset directory using the bids_validator package. |
| omex | Shallow OMEX check — confirms the archive is a zip with manifest.xml at the root. |
| schema | Validate path against the shipped JSON Schema; auto-detects the target class. |
| sedml | Shallow SED-ML check — confirms the file has a <sedML> root element. |
all_
cli.validate.all_(
directory=typer.Argument(..., exists=True, file_okay=False, dir_okay=True, readable=True, help='Directory to walk.'),
pattern=typer.Option('*.yaml', '--pattern', help="Glob pattern, e.g. '*.yml' or '**/*.yaml'."),
fail_fast=typer.Option(False, '--fail-fast', help='Stop at first failure.'),
)Recursively run validate schema on every YAML file under directory matching pattern.
bids
cli.validate.bids(
path=typer.Argument(..., exists=True, file_okay=False, dir_okay=True, readable=True, help='BIDS dataset root.'),
)Validate a BIDS dataset directory using the bids_validator package.
omex
cli.validate.omex(
path=typer.Argument(..., exists=True, readable=True, help='OMEX archive (.omex / .zip).'),
)Shallow OMEX check — confirms the archive is a zip with manifest.xml at the root.
Full COMBINE-archive validation is scheduled for the post-P3 milestone.
schema
cli.validate.schema(
path=typer.Argument(..., exists=True, readable=True, help='YAML file.'),
target_class=typer.Option(None, '--class', help='Target class (auto-detected from `class:` key when omitted).'),
)Validate path against the shipped JSON Schema; auto-detects the target class.
Uses the lightweight jsonschema library against the pre-generated tvbo/datamodel/tvbo_datamodel.schema.json (produced from the LinkML schema at build time), so validation needs no runtime linkml. The file is parsed with TVBO’s loader so !include/merge-key extensions and slot aliases resolve exactly as they do when the model is loaded.
sedml
cli.validate.sedml(
path=typer.Argument(..., exists=True, readable=True, help='SED-ML XML file.'),
)Shallow SED-ML check — confirms the file has a <sedML> root element.
Full L1V4 validation is scheduled for the post-P3 milestone.