"""Assemble un inventaire des pièces par set et par couleur."""

from pathlib import Path

from lib.rebrickable.parts_inventory import write_parts_filtered


SETS_PATH = Path("data/intermediate/sets_enriched.csv")
INVENTORIES_PATH = Path("data/raw/inventories.csv")
INVENTORY_PARTS_PATH = Path("data/raw/inventory_parts.csv")
COLORS_PATH = Path("data/raw/colors.csv")
INVENTORY_MINIFIGS_PATH = Path("data/raw/inventory_minifigs.csv")
MINIFIGS_PATH = Path("data/raw/minifigs.csv")
DESTINATION_PATH = Path("data/intermediate/parts_filtered.csv")


def main() -> None:
    """Génère le fichier parts_filtered.csv prêt pour les analyses suivantes."""
    write_parts_filtered(
        SETS_PATH,
        INVENTORIES_PATH,
        INVENTORY_PARTS_PATH,
        COLORS_PATH,
        INVENTORY_MINIFIGS_PATH,
        MINIFIGS_PATH,
        DESTINATION_PATH,
    )


if __name__ == "__main__":
    main()
