Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Apr 8, 2024
1 parent c02993b commit 4572954
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
17 changes: 6 additions & 11 deletions src/pynwb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions src/pynwb/config/nwb_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4572954

Please sign in to comment.