system_assignation/helpers/configuration.py

23 lines
562 B
Python
Raw Normal View History

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')