diff --git a/src/pynwb/__init__.py b/src/pynwb/__init__.py index 03ad4e6bd..e5762aea1 100644 --- a/src/pynwb/__init__.py +++ b/src/pynwb/__init__.py @@ -22,27 +22,22 @@ CUR_DIR = os.path.dirname(os.path.realpath(__file__)) path_to_config = os.path.join(CUR_DIR, 'config/nwb_config.yaml') +def get_loaded_type_config(): + return hdmf.common.get_loaded_type_config() -def get_loaded_config(): - if __TYPE_MAP.ts_config.config is None: - msg = "No configuration is loaded." - raise ValueError(msg) - else: - return __TYPE_MAP.ts_config.config - -def load_termset_config(config_path: str = None): +def load_type_config(config_path: str = None): """ This method will either load the default config or the config provided by the path. """ if config_path is None: config_path = path_to_config - __TYPE_MAP.ts_config.load_termset_config(config_path) + hdmf.common.load_type_config(config_path) -def unload_termset_config(): +def unload_type_config(): """ Remove validation. """ - return __TYPE_MAP.ts_config.unload_termset_config() + hdmf.common.unload_termset_config() def __get_resources(): try: diff --git a/src/pynwb/config/nwb_config.yaml b/src/pynwb/config/nwb_config.yaml index 5269dfa5b..5af96a349 100644 --- a/src/pynwb/config/nwb_config.yaml +++ b/src/pynwb/config/nwb_config.yaml @@ -3,9 +3,11 @@ namespaces: version: 2.7.0-alpha data_types: Subject: - species: nwb_subject_termset.yaml + species: + termset: nwb_subject_termset.yaml NWBFile: - experimenter: experimenter_termset.yaml - electrodes: TBD + experimenter: + termset: experimenter_termset.yaml ElectrodeGroup: - location: location_termset.yaml + location: + termset: location_termset.yaml