from pathlib import Path


def get_config_path(path=None):
    """Get the path to the configuration file.

    By default, this file is ``~/.nbreport.yaml``.

    Parameters
    ----------
    path : `str` or `pathlib.Path`, optional
        An optional, user-provided, override of the default configuration file
        path.

    Returns
    -------
    path : `pathlib.Path`
        Path to the configuration file (whether it exists, or not).
    """
    if path is None:
        path = Path.home() / '.nbreport.yaml'
    else:
        path = Path(path)
    return path