def load_with_links(source_path): # type: (str) -> (HasTraits, GenericAttributes) """ Load a datatype stored in the tvb h5 file found at the given path, but also create empty linked entities to hold GID """ loader = TVBLoader(REGISTRY) return loader.load_with_links(source_path)
def load_with_links_from_dir(base_dir, gid): # type: (str, typing.Union[uuid.UUID, str]) -> HasTraits dir_loader = DirLoader(base_dir, REGISTRY, False) fname = dir_loader.find_file_name(gid) fname = os.path.join(base_dir, fname) tvb_loader = TVBLoader(REGISTRY) return tvb_loader.load_with_links(fname)