bluesky_tiled_plugins.clients.bluesky_run#

Module Contents#

Classes#

BlueskyRun

A Mapping is a generic container for associating key/value pairs.

BlueskyRunV2

A MongoDB-native layout of BlueskyRuns

BlueskyRunV2Mongo

A MongoDB-native layout of BlueskyRuns

BlueskyRunV2SQL

A MongoDB-native layout of BlueskyRuns

BlueskyRunV3

A BlueskyRun that is backed by a SQL database.

API#

class bluesky_tiled_plugins.clients.bluesky_run.BlueskyRun(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: tiled.client.container.Container

A Mapping is a generic container for associating key/value pairs.

This class provides concrete generic implementations of all methods except for getitem, iter, and len.

property start: dict[str, tiled.type_aliases.JSON_ITEM]#

The Run Start document. A convenience alias:

run.start is run.metadata[“start”] True

property stop: dict[str, tiled.type_aliases.JSON_ITEM]#

The Run Stop document. A convenience alias:

run.stop is run.metadata[“stop”] True

descriptors() list[dict[str, tiled.type_aliases.JSON_ITEM]]#
describe() dict[str, dict[str, tiled.type_aliases.JSON_ITEM]]#

For back-compat with intake-based BlueskyRun

abstractmethod read()#
property base: tiled.client.container.Container#

Return the base Container client instead of a BlueskyRun client

to_dask#

None

class bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRun

A MongoDB-native layout of BlueskyRuns

This layout has been in use prior to the introduction of SQL backend in May 2025.

property v1#

Accessor to legacy interface.

property v2: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2#
property v3: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV3#
class bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2Mongo(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2

A MongoDB-native layout of BlueskyRuns

This layout has been in use prior to the introduction of SQL backend in May 2025.

documents(fill=False)#
class bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2SQL(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2, bluesky_tiled_plugins.clients.bluesky_run._BlueskyRunSQL

A MongoDB-native layout of BlueskyRuns

This layout has been in use prior to the introduction of SQL backend in May 2025.

class bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV3(context, *, item, structure_clients, queries=None, sorting=None, structure=None, include_data_sources=False)#

Bases: bluesky_tiled_plugins.clients.bluesky_run._BlueskyRunSQL

A BlueskyRun that is backed by a SQL database.

property v1#

Access to legacy interface

property v2: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV2#
property v3: bluesky_tiled_plugins.clients.bluesky_run.BlueskyRunV3#
validate(fix_errors=True, try_reading=True, raise_on_error=False, ignore_errors=None, write_notes=True)#

Validate for for completeness and data integrity.

Parameters

fix_errors : bool, optional Whether to attempt to fix structural errors found during validation. Default is True. try_reading : bool, optional Whether to attempt reading the data for external data keys. Default is True. raise_on_error : bool, optional Whether to raise an exception on the first validation error encountered. Default is False. ignore_errors : list of str, optional List of error messages to ignore during validation. If any errors whose message matches one of the patterns in this list are encountered, they will be logged, but the validation of the remaining data keys will continue. write_notes : bool, optional Whether to write validation notes to the root client’s metadata. Default is True.

Returns

bool True if the data structure is valid and reading succeeded, False otherwise.