GCRCatalogs/register.py
def load_catalog(catalog_name, config_overwrite=None):
    """
    Load a galaxy catalog as specified in one of the yaml file in catalog_configs.

    Parameters
    ----------
    catalog_name : str
        name of the catalog (without '.yaml')
    config_overwrite : dict, optional
        a dictionary of config options to overwrite

    Return
    ------
    galaxy_catalog : instance of a subclass of BaseGalaxyCatalog
    """
    catalog_name = strip_yaml_extension(catalog_name)

    if catalog_name not in available_catalogs:
        raise KeyError("Catalog `{}` does not exist in the register. See `available_catalogs`.".format(catalog_name))

    config = available_catalogs[catalog_name]

    if config.get('alias'):
        if strip_yaml_extension(config.get('alias', '')) == catalog_name:
            raise ValueError('Oops, config {} alias itself!'.format(catalog_name))
        url = '{}/{}/{}.yaml'.format(_GITHUB_URL, _CONFIG_DIRNAME, catalog_name)
        try:
            online_config = load_yaml(url)
        except (requests.RequestException, yaml.error.YAMLError):
            warnings.warn('Version check skipped. Not able to retrive or load online config file {}'.format(url))
        else:
            if config['alias'] != online_config.get('alias'):
                warnings.warn('`{}` points to local version `{}`, differs from online version `{}`'.format(
                    catalog_name,
                    config['alias'],
                    online_config.get('alias'),
                ))

        return load_catalog(config['alias'], config_overwrite)

    if config_overwrite:
        if 'alias' in config_overwrite:
            raise ValueError('`config_overwrite` cannot specify `alias`!')
        config = config.copy()
        config.update(config_overwrite)

    return load_catalog_from_config_dict(config)

    Load a galaxy catalog as specified in one of the yaml file in catalog_configs.

    Parameters
    ----------
    catalog_name : str
        name of the catalog (without '.yaml')
    config_overwrite : dict, optional
        a dictionary of config options to overwrite

    Return
    ------
    galaxy_catalog : instance of a subclass of BaseGalaxyCatalog
    
Load a galaxy catalog as specified in one of the yaml file in catalog_configs.
Parameters

catalog_name : str
name of the catalog (without '.yaml')
config_overwrite : dict, optional
a dictionary of config options to overwrite

Return

galaxy_catalog : instance of a subclass of BaseGalaxyCatalog
Load a galaxy catalog as specified in one of the yaml file in catalog_configs . Parameters catalog_name : str name of the catalog ( without ' . yaml ' ) config_overwrite : dict optional a dictionary of config options to overwrite Return galaxy_catalog : instance of a subclass of BaseGalaxyCatalog
def load_catalog(catalog_name, config_overwrite=None):
    catalog_name = strip_yaml_extension(catalog_name)
    if catalog_name not in available_catalogs:
        raise KeyError("Catalog `{}` does not exist in the register. See `available_catalogs`.".format(catalog_name))
    config = available_catalogs[catalog_name]
    if config.get('alias'):
        if strip_yaml_extension(config.get('alias', '')) == catalog_name:
            raise ValueError('Oops, config {} alias itself!'.format(catalog_name))
        url = '{}/{}/{}.yaml'.format(_GITHUB_URL, _CONFIG_DIRNAME, catalog_name)
        try:
            online_config = load_yaml(url)
        except (requests.RequestException, yaml.error.YAMLError):
            warnings.warn('Version check skipped. Not able to retrive or load online config file {}'.format(url))
        else:
            if config['alias'] != online_config.get('alias'):
                warnings.warn('`{}` points to local version `{}`, differs from online version `{}`'.format(
                    catalog_name,
                    config['alias'],
                    online_config.get('alias'),
                ))
        return load_catalog(config['alias'], config_overwrite)
    if config_overwrite:
        if 'alias' in config_overwrite:
            raise ValueError('`config_overwrite` cannot specify `alias`!')
        config = config.copy()
        config.update(config_overwrite)
    return load_catalog_from_config_dict(config)
def load_catalog ( catalog_name , config_overwrite = None ) : catalog_name = strip_yaml_extension ( catalog_name ) if catalog_name not in available_catalogs : raise KeyError ( "Catalog `{}` does not exist in the register. See `available_catalogs`." . format ( catalog_name ) ) config = available_catalogs [ catalog_name ] if config . get ( 'alias' ) : if strip_yaml_extension ( config . get ( 'alias' , '' ) ) == catalog_name : raise ValueError ( 'Oops, config {} alias itself!' . format ( catalog_name ) ) url = '{}/{}/{}.yaml' . format ( _GITHUB_URL , _CONFIG_DIRNAME , catalog_name ) try : online_config = load_yaml ( url ) except ( requests . RequestException , yaml . error . YAMLError ) : warnings . warn ( 'Version check skipped. Not able to retrive or load online config file {}' . format ( url ) ) else : if config [ 'alias' ] != online_config . get ( 'alias' ) : warnings . warn ( '`{}` points to local version `{}`, differs from online version `{}`' . format ( catalog_name , config [ 'alias' ] , online_config . get ( 'alias' ) , ) ) return load_catalog ( config [ 'alias' ] , config_overwrite ) if config_overwrite : if 'alias' in config_overwrite : raise ValueError ( '`config_overwrite` cannot specify `alias`!' ) config = config . copy ( ) config . update ( config_overwrite ) return load_catalog_from_config_dict ( config )
Load a galaxy catalog as specified in one of the yaml file in catalog_configs.
Load a galaxy catalog as specified in one of the yaml file in catalog_configs .
"""
    Load a galaxy catalog as specified in one of the yaml file in catalog_configs.

    Parameters
    ----------
    catalog_name : str
        name of the catalog (without '.yaml')
    config_overwrite : dict, optional
        a dictionary of config options to overwrite

    Return
    ------
    galaxy_catalog : instance of a subclass of BaseGalaxyCatalog
    """
catalog_name
config_overwrite