Pydantic schema for TissUUmaps
Python 3.9 or later
Use the package manager pip to install tissuumaps-schema:
pip install tissuumaps-schema
To list all available $VERSION
values:
tissuumaps-schema versions
To list all available $MODEL
values for the specified $VERSION
:
tissuumaps-schema models --version $VERSION
To generate a JSON Schema for the specified $VERSION
and $MODEL
:
tissuumaps-schema generate --version $VERSION $MODEL
To upgrade an existing instance of $MODEL
to the specified $VERSION
:
tissuumaps-schema upgrade --to-version $VERSION $MODEL myinstance.json
To validate an existing instance of $MODEL
against the specified $VERSION
:
tissuumaps-schema validate --expect-version $VERSION $MODEL myinstance.json
For each $VERSION
and $MODEL
(lower case), a JSON Schema is hosted on:
https://tissuumaps.github.io/TissUUmaps-schema/$VERSION/$MODEL.json
The JSON Schema of each $VERSION
and $MODEL
(lower case) is documented on:
https://tissuumaps.github.io/TissUUmaps-schema/$VERSION/$MODEL.html
If you find a bug, please raise an issue.
Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Both the schema and the associated Python package adhere to Semantic Versioning:
- Each file adhering to the schema contains the MAJOR.MINOR schema version it was created with/for (see
RootSchemaBaseModel.schema_version
and<schema_module>.VERSION
). - Briefly, changes in MAJOR indicate breaking changes necessitating file upgrade/conversion, changes in MINOR indicate non-breaking feature additions, and changes in PATCH indicate bugfixes in the Python package.
- The MAJOR.MINOR Python package version equals the version of the latest schema supported by the package. Each TissUUmaps release pins the MAJOR.MINOR version of the tissuumaps-schema package to indicate the supported schema version.
- For each MAJOR version, the Python package contains a dedicated module with the latest MINOR subversion of the schema. Upgrade paths exist from one MAJOR version (latest MINOR subversion) to the next MAJOR version (latest MINOR subversion).