Source code for nrv.backend._config

"""
Everything about the configuration, gathers :in a singleton:
* Macine configuration,
* NRV parameters,
* ...
"""

from ._NRV_Singleton import NRV_singleton
from ._machine_config import MachineConfig
from ._parameters import nrv_parameters


[docs] class nrv_config(metaclass=NRV_singleton): """A unique class to handle all the configuration"""
[docs] def __init__(self): """ Initialize the global configuration wrapper. """ self.machine_config = MachineConfig() self.framework_parameters = nrv_parameters()
[docs] def display_machine_config(self): """ Print the current machine configuration. """ print(self.machine_config)