Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Jan 10, 2024
1 parent bb40b5a commit b9b52f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
16 changes: 16 additions & 0 deletions src/hdmf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@
global TS_CONFIG
TS_CONFIG = TermSetConfigurator()

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

Check failure on line 13 in src/hdmf/__init__.py

View workflow job for this annotation

GitHub Actions / Check for spelling errors

configuartion ==> configuration
'default': '/Users/mavaylon/Research/NWB/hdmf2/hdmf/docs/gallery/example_config.yaml'}) #update path
def load_termset_config(config_path: str):
"""
Load the configuration file for validation on the fields defined for the objects within the file.
By default, the curated configuration file is used, but can take in a custom file.
"""
return __TS_CONFIG.load_termset_config(config_path)


def unload_termset_config():
"""
Remove validation.
"""
return __TS_CONFIG.unload_termset_config()

@docval(
{"name": "dataset", "type": None, "doc": "the HDF5 dataset to slice"},
{"name": "region", "type": None, "doc": "the region reference to use to slice"},
Expand Down
17 changes: 0 additions & 17 deletions src/hdmf/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,6 @@ def available_namespaces():
return __TYPE_MAP.namespace_catalog.namespaces


@docval({'name': 'config_path', 'type': str, 'doc': 'Path to the configuartion file.',
'default': '/Users/mavaylon/Research/NWB/hdmf2/hdmf/docs/gallery/example_config.yaml'}) #update path
def load_termset_config(config_path: str):
"""
Load the configuration file for validation on the fields defined for the objects within the file.
By default, the curated configuration file is used, but can take in a custom file.
"""
return __TS_CONFIG.load_termset_config(config_path)


def unload_termset_config():
"""
Remove validation according to termset configuration file.
"""
return __TS_CONFIG.unload_termset_config()


# a function to get the container class for a give type
@docval({'name': 'data_type', 'type': str,
'doc': 'the data_type to get the Container class for'},
Expand Down

0 comments on commit b9b52f2

Please sign in to comment.