def __init__(self, path=DEFAULT_SETTINGS):
    path = Path(path)
    text = path.read_text(encoding='utf-8')
    data = yaml.safe_load(text)
    self.default_backend = data.get('default_backend', 'localfs')
    self.job_options = data.get('job_options')
    self.backend_options = data.get('backend_options')
    self.logging = data.get('logging', DEFAULT_LOGGING)
    metrics_config = data.get('metrics', {})
    self.metrics = get_metrics_engine(metrics_config)
def __init__(self, path=DEFAULT_SETTINGS):
    path = Path(path)
    text = path.read_text(encoding='utf-8')
    data = yaml.safe_load(text)
    self.default_backend = data.get('default_backend', 'localfs')
    self.job_options = data.get('job_options')
    self.backend_options = data.get('backend_options')
    self.logging = data.get('logging', DEFAULT_LOGGING)
    metrics_config = data.get('metrics', {})
    self.metrics = get_metrics_engine(metrics_config)