From edb530dc9eb07bf24d8361c5b19d2240a96fb26d Mon Sep 17 00:00:00 2001 From: WorldTeacher <41587052+WorldTeacher@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:14:45 +0200 Subject: [PATCH] add documentation to config class --- config/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/config/config.py b/config/config.py index d6b37a7..871778e 100644 --- a/config/config.py +++ b/config/config.py @@ -141,6 +141,17 @@ class Config: else: raise KeyError(f"Option {option} not found in configuration") + @property + def documentation(self)->bool: + if self._config is None: + raise RuntimeError("Configuration not loaded") + return self._config.documentation + @documentation.setter + def documentation(self, value: bool): + if self._config is None: + raise RuntimeError("Configuration not loaded") + self._config.documentation = value + def to_Omegaconf(self): return omegaconf.OmegaConf.create(self._config)