import yaml


def open_yaml_file(filename):
    """
    Open a yaml file to extract configuration details.

    Paramters
    ---------
    filename : STRING
        path to the file to be opened.

    Returns
    -------
    config : STRING
        configuration details located in the file.
    """
    try:
        with open(filename, 'r') as f:
            config = yaml.load(f, Loader=yaml.FullLoader)
        return config
    except Exception as e:
        print(str(e))