Schema#
Loading/saving NWB Schema yaml files
- load_namespaces(path: Path | NamespaceRepo) Namespaces #
Loads the NWB SCHEMA LANGUAGE namespaces (not the namespacesadapter)
- load_schema_file(path: Path, yaml: dict | None = None) SchemaAdapter #
Load a single schema file within an NWB namespace.
Note
This needs to be a separate function from loading a namespace because NWB doesn’t define a schema file per se in its spec, aside from having a
datasets
andgroups
dictionary. We wanted to be as faithful to the spec as possible in that package, and so that’s picked up here.
- load_namespace_adapter(namespace: Path | NamespaceRepo | Namespaces, path: Path | None = None, version: str | None = None) NamespacesAdapter #
Load all schema referenced by a namespace file
- Parameters:
namespace (
:class:
.Namespace`) –path (
pathlib.Path
) – Optional: Location of the namespace file - all relative paths are interpreted relative to thisversion (str) – Optional: tag or commit to check out namespace is a
NamespaceRepo
. IfNone
, useHEAD
if not already checked out, or otherwise use whatever version is already checked out.
- Returns:
- load_nwb_core(core_version='2.6.0', hdmf_version='1.5.0') NamespacesAdapter #
Convenience function for loading the NWB core schema + hdmf-common as a namespace adapter.
Note
NWB Core schema are implicitly linked to a specific version of HDMF common by virtue of which version of hdmf-common-schema is checked out as a submodule in the repository. We don’t attempt to resolve that linkage here because it’s not in the schema, but the defaults are for the latest nwb core (
'2.6.0'
) and its linked hdmf-common version ('1.5.0'
)- Parameters:
Returns: