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}.json files into; created if necessary.

  • package (str, default: 'lsst.images') – Package whose schemas to freeze; see available_schema_classes.

Returns:

Paths that were created or rewritten.

Return type:

list [ pathlib.Path ]

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.

This page was last modified on .