Find the EUPS table file for a project.

    Parameters
    ----------
    root_project_dir : `str`
        Path to the root directory of the main documentation project. This
        is the directory containing the ``conf.py`` file and a ``ups``
        directory.

    Returns
    -------
    table_path : `str`
        Path to the EUPS table file.

def find_table_file(root_project_dir):
    """Find the EUPS table file for a project.

    Parameters
    ----------
    root_project_dir : `str`
        Path to the root directory of the main documentation project. This
        is the directory containing the ``conf.py`` file and a ``ups``
        directory.

    Returns
    -------
    table_path : `str`
        Path to the EUPS table file.
    """
    ups_dir_path = os.path.join(root_project_dir, 'ups')
    table_path = None
    for name in os.listdir(ups_dir_path):
        if name.endswith('.table'):
            table_path = os.path.join(ups_dir_path, name)
            break
    if not os.path.exists(table_path):
        raise RuntimeError(
            'Could not find the EUPS table file at {}'.format(table_path))
    return table_path