import json
from pathlib import Path


def read_configfile(filepath: Path) -> dict:
    """
    Reads in the config file from root directory
    Returns:
        returns the json file storing configuration
    """
    CONFIG_FILEPATH = Path(filepath)

    with open(CONFIG_FILEPATH, 'r', encoding='utf-8') as fp:
        config_dict = json.load(fp)

    return config_dict