Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Jan 19, 2024
1 parent 18911f2 commit 0908d65
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
1 change: 0 additions & 1 deletion docs/gallery/general/plot_configurator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pynwb import nwb_config
from datetime import datetime
from uuid import uuid4

Expand Down
14 changes: 7 additions & 7 deletions src/pynwb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
from hdmf.backends.hdf5 import HDF5IO as _HDF5IO
from hdmf.build import BuildManager, TypeMap
import hdmf.common
from hdmf.term_set import TermSetConfigurator

CORE_NAMESPACE = 'core'

from .spec import NWBDatasetSpec, NWBGroupSpec, NWBNamespace # noqa E402
from .validate import validate # noqa: F401, E402

from .termset_config import NWBTermSetConfigurator

CUR_DIR = os.path.dirname(os.path.realpath(__file__))
path_to_config = os.path.join(CUR_DIR, 'config/nwb_config.yaml')
nwb_config = NWBTermSetConfigurator(path=path_to_config)
path_to_config = os.path.join(CUR_DIR, 'config/NWB_CONFIG.yaml')
NWB_CONFIG = TermSetConfigurator(path=path_to_config)

@docval({'name': 'config_path', 'type': str, 'doc': 'Path to the configuartion file.',

Check failure on line 27 in src/pynwb/__init__.py

View workflow job for this annotation

GitHub Actions / Check for spelling errors

configuartion ==> configuration
'default': None})
Expand All @@ -37,16 +37,16 @@ def load_termset_config(config_path: str):
- If the data_type is not present, then they will be loaded alongside the default curated configuration.
"""
if config_path is None:
nwb_config.unload_termset_config()
nwb_config.load_termset_config()
NWB_CONFIG.unload_termset_config()
NWB_CONFIG.load_termset_config()
else:
nwb_config.load_termset_config(config_path)
NWB_CONFIG.load_termset_config(config_path)

def unload_termset_config():
"""
Remove validation.
"""
return nwb_config.unload_termset_config()
return NWB_CONFIG.unload_termset_config()


def __get_resources():
Expand Down
4 changes: 2 additions & 2 deletions src/pynwb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def _error_on_new_warn_on_construct(self, error_msg: str):
warn(error_msg)

def get_config(self):
from . import nwb_config #update path
return nwb_config
from . import NWB_CONFIG #update path
return NWB_CONFIG

def get_type_map(self):
from . import get_type_map
Expand Down
12 changes: 0 additions & 12 deletions src/pynwb/termset_config.py

This file was deleted.

0 comments on commit 0908d65

Please sign in to comment.