DatasetProvenance

class lsst.daf.butler.DatasetProvenance(*, inputs: list[lsst.daf.butler._dataset_ref.SerializedDatasetRef] = <factory>, quantum_id: ~uuid.UUID | None = None, extras: dict[uuid.UUID, dict[str, int | float | str | bool]] = <factory>)

Bases: BaseModel

Provenance of a single DatasetRef.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

add_extra_provenance(dataset_id, extra)

Attach extra provenance to a specific dataset.

add_input(ref)

Add an input dataset to the provenance.

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

populate_cache()

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

add_extra_provenance(dataset_id: UUID, extra: dict[str, int | float | str | bool]) None

Attach extra provenance to a specific dataset.

Parameters:
dataset_iduuid.UUID

The ID of the dataset to receive this provenance.

extradict [ str, typing.Any ]

The extra provenance information as a dictionary. The values must be simple Python scalars.

add_input(ref: DatasetRef) None

Add an input dataset to the provenance.

Parameters:
refDatasetRef

A dataset to register as an input.

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Args:

self: The BaseModel instance. context: The context.

populate_cache() Self