bluesky_tiled_plugins.writing.validator#
Module Contents#
Functions#
Validate the given BlueskyRun client for completeness and data integrity. |
|
Attempt to read data from the given data client to validate data accessibility |
|
Validate and optionally fix the structure of the given (array) dataset. |
Data#
API#
- bluesky_tiled_plugins.writing.validator.logger#
‘getLogger(…)’
- exception bluesky_tiled_plugins.writing.validator.ValidationException(message, uid=None)#
Bases:
ExceptionCommon base class for all non-exit exceptions.
- exception bluesky_tiled_plugins.writing.validator.ReadingValidationException(message, uid=None)#
Bases:
bluesky_tiled_plugins.writing.validator.ValidationExceptionCommon base class for all non-exit exceptions.
- exception bluesky_tiled_plugins.writing.validator.RunValidationException(message, uid=None)#
Bases:
bluesky_tiled_plugins.writing.validator.ValidationExceptionCommon base class for all non-exit exceptions.
- exception bluesky_tiled_plugins.writing.validator.MetadataValidationException(message, uid=None)#
Bases:
bluesky_tiled_plugins.writing.validator.ValidationExceptionCommon base class for all non-exit exceptions.
- bluesky_tiled_plugins.writing.validator.validate(root_client, fix_errors=True, try_reading=True, raise_on_error=False, ignore_errors=[])#
Validate the given BlueskyRun client for completeness and data integrity.
Parameters
root_client : tiled.client.run.RunClient The Run client to validate. 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 reading validation. Default is an empty list.
Returns
bool True if validation passed without errors, False otherwise.
- bluesky_tiled_plugins.writing.validator.validate_reading(data_client, ignore_errors=[])#
Attempt to read data from the given data client to validate data accessibility
Parameters
data_client : tiled.client.ArrayClient or tiled.client.DataFrameClient The data client to validate reading from. ignore_errors : list of str, optional List of error messages to ignore during reading validation. Default is an empty list.Raises
ReadingValidationException If reading the data fails with an unignored error.
- bluesky_tiled_plugins.writing.validator.validate_structure(data_client, fix_errors=False) list[str]#
Validate and optionally fix the structure of the given (array) dataset.
Parameters
data_client : tiled.client.ArrayClient The data client whose structure is to be validated. fix_errors : bool, optional Whether to attempt to fix structural errors found during validation. Default is False.Returns
list of str A list of human-readable notes describing any fixes applied during validation.