Preload#

Maps to change the loaded .yaml from nwb schema before it’s given to the nwb_schema_language models

class SCOPE_TYPES(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
namespace = 'namespace'#
class PHASES(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
postload = 'postload'#

After the YAML for a model has been loaded

class KeyMap(scope: str, scope_type: nwb_linkml.maps.postload.SCOPE_TYPES, source: str, target: str, transform: Optional[<built-in function callable>] = None, phase: Optional[nwb_linkml.maps.postload.PHASES] = None, **_kwargs)#
scope: str#

The namespace that the map is relevant to

scope_type: SCOPE_TYPES#
source: str#

The path within the schema to select the element to transform

target: str#

The path where the element should end

transform: callable | None = None#

Some transformation function, currently not implemented.

phase: PHASES | None = None#
instances: ClassVar[List[KeyMap]] = [KeyMap(scope='hdmf-common', scope_type=<SCOPE_TYPES.namespace: 'namespace'>, source="'data_type_def'", target="'neurodata_type_def'", transform=None, phase=<PHASES.postload: 'postload'>), KeyMap(scope='hdmf-common', scope_type=<SCOPE_TYPES.namespace: 'namespace'>, source="'data_type_inc'", target="'neurodata_type_inc'", transform=None, phase=<PHASES.postload: 'postload'>)]#

Maps that get defined!!!

apply(input: dict) dict#

Change all keys from source to target in a super naive way.

Convert the dictionary to a string. Do regex. parse ast

class MAP_TYPES(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
key = 'key'#

Mapping the name of one key to another key

apply_postload(ns_dict) dict#