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; see available_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_VERSION instead 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. retired fixtures are never touched.

Canonical twins are regenerated from their as_shipped siblings 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 something refresh may do. A retired as_shipped fixture is excluded, since it no longer validates and has no twin to regenerate.

This writes and creates files; it never invokes version control.

This page was last modified on .