feat: rework settings, conf to detect settings changes better
This commit is contained in:
@@ -140,7 +140,15 @@ class Config:
|
||||
self._config[option] = True
|
||||
else:
|
||||
raise KeyError(f"Option {option} not found in configuration")
|
||||
|
||||
|
||||
|
||||
def to_Omegaconf(self):
|
||||
return omegaconf.OmegaConf.create(self._config)
|
||||
|
||||
def updateValue(self, key:str, value):
|
||||
if self._config is None:
|
||||
raise RuntimeError("Configuration not loaded")
|
||||
self._config[key] = value
|
||||
if __name__ == "__main__":
|
||||
cfg = Config("config/settings.yaml")
|
||||
#print(cfg.database.path)
|
||||
|
||||
Reference in New Issue
Block a user