write_frozen_schemas#
- lsst.images.serialization.write_frozen_schemas(directory, package='lsst.images')#
Write the frozen schema file for every current schema.
- Parameters:
directory (
Path) – Directory to write the{name}-{version}.jsonfiles into; created if necessary.package (
str, default:'lsst.images') – Package whose schemas to freeze; seeavailable_schema_classes.
- Returns:
Paths that were created or rewritten.
- Return type:
list[pathlib.Path]
Notes
Schemas at a development version (a PEP 440
.devNrelease) 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.A schema is frozen only if every schema it depends on is already finalized; see
schema_dependencies. The check runs when a frozen file is first written, so an already-committed file is never re-validated.- Raises:
FrozenSchemaError – If a finalized schema’s frozen file exists and the live model would change its content; bump
SCHEMA_VERSIONinstead of overwriting. Also raised if a schema being frozen depends on a schema still in development.