import csv


def load_asdp_ordering(orderfile):
    """
    Loads an ASDP ordering produced by JEWEL from a CSV file

    Parameters
    ----------
    orderfile: str
        path to order CSV file

    Returns
    -------
    ordering: list
        list of dicts containing entries for the following fields:
            - asdp_id
            - initial_sue
            - final_sue
            - initial_sue_per_byte
            - final_sue_per_byte
            - size_bytes
            - timestamp
    """
    with open(orderfile, 'r') as f:
        reader = csv.DictReader(f)
        return list(reader)