From b9b52f2d2f17c100faa39c914baa25b91b438080 Mon Sep 17 00:00:00 2001 From: mavaylon1 Date: Wed, 10 Jan 2024 14:45:42 -0800 Subject: [PATCH] move --- src/hdmf/__init__.py | 16 ++++++++++++++++ src/hdmf/common/__init__.py | 17 ----------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/hdmf/__init__.py b/src/hdmf/__init__.py index da1ad3b77..61fa9f364 100644 --- a/src/hdmf/__init__.py +++ b/src/hdmf/__init__.py @@ -10,6 +10,22 @@ global TS_CONFIG TS_CONFIG = TermSetConfigurator() +@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. + """ + 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"}, diff --git a/src/hdmf/common/__init__.py b/src/hdmf/common/__init__.py index f18eb7497..e0782effe 100644 --- a/src/hdmf/common/__init__.py +++ b/src/hdmf/common/__init__.py @@ -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'},