freeze_schema_fixtures#
- lsst.images.tests.freeze_schema_fixtures(directory, *, package='lsst.images')#
Move ordinary development fixtures to their finalized versions.
- Parameters:
directory (
Path) – Directory holding the fixture tree.package (
str, default:'lsst.images') – Package whose schemas to freeze; seeavailable_schema_classes.
- Returns:
One
(written, removed)pair per fixture that was frozen.- Return type:
list[tuple[pathlib.Path,pathlib.Path] ]- Raises:
SchemaFixtureError – If a target path already exists or an
as_shippeddevelopment fixture cannot be frozen without rewriting its preserved bytes.
Notes
Writes the final-version fixture from the
.devfixture’s content in canonical form, which normalizes the stamp fromX.Y.Z.devNtoX.Y.Z, then deletes the.devfile. Every ordinary variant is carried over.An
as_shippedfixture cannot be frozen: changing its embedded development stamp would violate its byte-preservation contract, while copying it unchanged under a final-version filename would make the stamp and filename disagree. Such a fixture must be replaced with bytes from a genuinely final-version shipped artifact before freezing.All targets, source reads, and conflicts are checked before any file is written or deleted, so a predictable validation or target conflict cannot leave a partially frozen fixture tree.
This writes and deletes files; it never invokes version control. Staging the addition and the deletion is left to the caller.