""" Configuration helper SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca """ import configparser from pathlib import Path class Configuration: def __init__(self): base_path = Path().resolve().parent config_file = Path(base_path / 'config/configuration.ini').resolve() self._config = configparser.ConfigParser() self._config.read(config_file) @property def h_i(self): return self._config.getfloat('convective_fluxes', 'h_i') @property def h_e(self): return self._config.getfloat('convective_fluxes', 'h_e') @property def frame_ratio(self): return self._config.getint('windows', 'frame_ratio')