def set_invenio(ctx, production):
    """Add Invenio details: api urls, communities, to context object

    Parameters
    ----------
    ctx: click context obj 
        Api details
    production: bool
        If True using production api, if False using sandbox

    Returns
    -------
    ctx: click context obj 
        Api details with url and community added 
    """

    if production:
        base_url = 'https://oneclimate.dmponline.cloud.edu.au/api'
    else:
        base_url = 'https://test.dmponline.cloud.edu.au/api'
    ctx.obj['url'] = f'{base_url}/records'
    ctx.obj['deposit'] = f'{base_url}/records'
    ctx.obj['communities'] = f'{base_url}/communities'
    return ctx