refresh_schema_fixtures#
- lsst.images.tests.refresh_schema_fixtures(directory, *, package='lsst.images')#
Rewrite every development fixture in canonical form.
- Parameters:
directory (
Path) – Directory holding the fixture tree.package (
str, default:'lsst.images') – Package whose schemas to refresh; seeavailable_schema_classes.
- Returns:
Paths that were created or rewritten.
- Return type:
list[pathlib.Path]- Raises:
SchemaFixtureError – If a fixture at a finalized version would change. Bump
SCHEMA_VERSIONinstead of rewriting it.
Notes
Only fixtures of a schema whose live version is a development release are rewritten. A development schema with no fixture yet is seeded from its newest non-retired fixture, per variant, so the exemplar is carried forward rather than reinvented.
retiredfixtures are never touched.Canonical twins are regenerated from their
as_shippedsiblings only while their schema version is in development. At a finalized version the twin pins how shipped bytes normalize on read, so changing or creating it is a reviewed, manual operation rather than somethingrefreshmay do. A retiredas_shippedfixture is excluded, since it no longer validates and has no twin to regenerate.This writes and creates files; it never invokes version control.