hdmf.backends.builderupdater module

class hdmf.backends.builderupdater.BuilderUpdater

Bases: object

json_schema_file = 'sidecar.schema.json'
classmethod get_json_schema()

Load the sidecar JSON schema.

classmethod validate_sidecar(sidecar_dict)

Validate the sidecar JSON dict with the sidecar JSON schema.

classmethod convert_dtype_using_map(value, dtype_str)
classmethod convert_dtype_helper(value, dtype)
classmethod convert_dtype(value, dtype, old_value)
classmethod update_from_sidecar_json(file_builder, file_path)

Update the file builder in-place with the values specified in the sidecar JSON.

Parameters
  • file_builder (GroupBuilder) – A GroupBuilder representing the main file object.

  • file_path (str) – Path to the data file. The sidecar file is assumed to have the same base name but with suffix .json.

Returns

The same input GroupBuilder, now modified.

Return type

GroupBuilder

exception hdmf.backends.builderupdater.SidecarValidationError

Bases: Exception

Error raised when a sidecar file fails validation with the JSON schema.