def load_configuration():
    """Load the configuration"""

    (belbio_conf_fp, belbio_secrets_fp) = get_belbio_conf_files()
    log.info(f"Using conf: {belbio_conf_fp} and secrets files: {belbio_secrets_fp} ")

    config = {}
    if belbio_conf_fp:
        with open(belbio_conf_fp, "r") as f:
            config = yaml.load(f, Loader=yaml.SafeLoader)
            config["source_files"] = {}
            config["source_files"]["conf"] = belbio_conf_fp

    if belbio_secrets_fp:
        with open(belbio_secrets_fp, "r") as f:
            secrets = yaml.load(f, Loader=yaml.SafeLoader)
            config["secrets"] = copy.deepcopy(secrets)
            if "source_files" in config:
                config["source_files"]["secrets"] = belbio_secrets_fp

    get_versions(config)

    # TODO - needs to be completed
    # add_environment_vars(config)

    return config
def load_configuration ( ) : ( belbio_conf_fp , belbio_secrets_fp ) = get_belbio_conf_files ( ) log . info ( f"Using conf: {belbio_conf_fp} and secrets files: {belbio_secrets_fp} " ) config = { } if belbio_conf_fp : with open ( belbio_conf_fp , "r" ) as f : config = yaml . load ( f , Loader = yaml . SafeLoader ) config [ "source_files" ] = { } config [ "source_files" ] [ "conf" ] = belbio_conf_fp if belbio_secrets_fp : with open ( belbio_secrets_fp , "r" ) as f : secrets = yaml . load ( f , Loader = yaml . SafeLoader ) config [ "secrets" ] = copy . deepcopy ( secrets ) if "source_files" in config : config [ "source_files" ] [ "secrets" ] = belbio_secrets_fp get_versions ( config ) return config
Load the configuration