iqm.cpc.core.observation.observation_load_utils.get_latest_observation#
- iqm.cpc.core.observation.observation_load_utils.get_latest_observation(dut_field, *, storage, dut_label, include_invalid=False, tags=None, set_id=None)#
Get the latest valid observation for the given DUT, based on the created timestamp.
If no observation was found, None is returned.
- Parameters:
dut_field (str) – the name of the observable to search by.
storage (StorageInterface) – The storage backend to query.
dut_label (str) – DUT label of the device being used.
include_invalid (bool) – when True, also observations marked as
invalidare included in the query.tags (list[str] | None) – The tags to filter the observation with. The observations need to have every one of the given tags associated with them.
set_id (UUID | None) – The observation set the observation is associated with.
- Returns:
Observation or None
- Return type:
ObservationData | None