Metadata#

class lsst.verify.Metadata(measurement_set, data=None)#

Bases: JsonSerializationMixin

Container for verification framework job metadata.

Metadata are key-value terms. Both keys and values should be JSON-serializable.

Parameters#

measurement_setlsst.verify.MeasurementSet, optional

When provided, metadata with keys prefixed by metric names are deferred to Metadata instances attached to measurements (lsst.verify.Measurement.notes).

datadict, optional

Dictionary to seed metadata.

Attributes Summary

json

A dict that can be serialized as semantic SQUASH JSON.

Methods Summary

items()

Iterate over key-value metadata pairs.

keys()

Get the metadata keys.

update(data)

Update metadata with key-value pairs from a dict-like object.

values()

Iterate over metadata values.

Attributes Documentation

json#

A dict that can be serialized as semantic SQUASH JSON.

Keys in the dict are metadata keys (see Metadata.keys). Values are the associated metadata values as JSON-serializable objects.

Methods Documentation

items()#

Iterate over key-value metadata pairs.

Yields#

itemItemsView

An iterable over metadata items that are a tuple of:

  • Key (str).

  • Value (object).

keys()#

Get the metadata keys.

Returns#

keysKeysView [str]

The keys that can be used to access metadata values (like a dict). Set-like.

update(data)#

Update metadata with key-value pairs from a dict-like object.

Parameters#

datadict-like

The data object needs to provide an items method to iterate over its key-value pairs. If this Metadata instance already has a key, the value will be overwritten with the value from data.

values()#

Iterate over metadata values.

Returns#

itemsValuesView

An iterable over all the values.