INNER CODE UNIT · Python

resolve_config

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

    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

#
# Command line interface
#

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…