write_frozen_schemas#

lsst.images.serialization.write_frozen_schemas(directory: Path, package: str = 'lsst.images') list[Path]#

Write the frozen schema file for every current schema.

Parameters#

directory

Directory to write the {name}-{version}.json files into; created if necessary.

package

Package whose schemas to freeze; see available_schema_classes.

Returns#

list [ pathlib.Path ]

Paths that were created or rewritten.

Notes#

Schemas at a development version (a PEP 440 .devN release) are skipped and never frozen. A finalized schema is frozen only on its first write; an existing frozen file is immutable, so a live-model change to it raises rather than overwriting. Frozen files for superseded versions are never touched, so old schema URLs keep resolving.

Raises#

FrozenSchemaError

If a finalized schema’s frozen file exists and the live model would change its content; bump SCHEMA_VERSION instead of overwriting.