"""Chargement des jalons (milestones) thématiques configurables."""

import csv
from pathlib import Path
from typing import List


def load_milestones(path: Path) -> List[dict]:
    """Charge la liste des jalons depuis un fichier CSV à deux colonnes (year, description)."""
    milestones = []
    with path.open() as csv_file:
        reader = csv.DictReader(csv_file)
        for row in reader:
            milestones.append({"year": int(row["year"]), "description": row["description"]})
    return milestones
