INNER CODE UNIT · Python

load_config

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

    def load_config(self, config_file):
        is_default_config = config_file is None
        config_file = config_file if config_file is not None else os.path.join(os.environ['HOME'], '.vs_emr/config.yaml')
        
        configuration = {}
        
        if os.path.exists(config_file):
            self.echo("Loading config from: %s" % config_file)
            configuration = load_yaml(config_file)
        elif is_default_config:
            echo("Default config file not fount at: %s. Running with empty configuration!" % config_file )
        else:
            raise(click.BadParameter("Provided config file does not exists: %s" % config_file))
        self.debug("Configuration is: %s" % configuration)
        return Configuration(configuration)
            
pass_aws_cxt = click.make_pass_decorator(AWSContext)
           

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…