DatasetTestHelper

class lsst.daf.butler.tests.DatasetTestHelper

Bases: object

Helper methods for Datasets.

Methods Summary

makeDatasetRef(datasetTypeName, dimensions, ...)

Make a DatasetType and wrap it in a DatasetRef for a test.

Methods Documentation

makeDatasetRef(datasetTypeName: str, dimensions: DimensionGroup | DimensionGraph | Iterable[str | Dimension], storageClass: StorageClass | str, dataId: DataCoordinate | Mapping[str, Any], *, id: DatasetId | None = None, run: str | None = None, conform: bool = True) DatasetRef

Make a DatasetType and wrap it in a DatasetRef for a test.

Parameters:
datasetTypeNamestr

The name of the dataset type.

dimensionsDimensionGroup or Iterable of str or Dimension

The dimensions to use for this dataset type.

storageClassStorageClass or str

The relevant storage class.

dataIdDataCoordinate or Mapping

The data ID of this ref.

idDatasetId or None, optional

The Id of this ref. Will be assigned automatically.

runstr or None, optional

The run for this ref. Will be assigned a default value if None.

conformbool, optional

Whther to force the dataID to be checked for conformity with the provided dimensions.

Returns:
refDatasetRef

The new ref.