INNER CODE UNIT · Python

__init__

aehrc/VariantSpark · cloud/aws-emr/python/vs_emr/cli.py:188

    def __init__(self, configuration):
        self.configuration = configuration
        
    def resolve_config(self, profiles, options, conf):
        
        def load_profile(profile_name):
            conf_profile = conf_profiles.get(profile_name)
            if conf_profile is not None:
                return conf_profile
            else:
                raise click.BadParameter("Profile `%s` not defined in the configuration" % profile_name)

        conf_defaults = self.configuration.get('default')
        conf_profiles = self.configuration.get('profiles', dict())
        profile_configs = [load_profile(profile_name) for profile_name in  profiles] if conf_profiles else []
        config = merge_configs([conf_defaults]+ profile_configs + [ cmd_conf_to_config(conf),  options])
        return config

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…