"""
Preprocess stage: containerlab deploy, toponode address updates, index pool clone.
"""

from pathlib import Path

from stage_processing.clab_deploy import run_deploy_clab
from stage_processing.toponode_addresses import run_update_toponode_addresses_for_stage
from stage_processing.index_pools import run_clone_index_pool_data


def run_preprocess(stage_dir: str | Path) -> None:
    """Run containerlab deploy, update toponode addresses, and clone index pool data."""
    run_deploy_clab(stage_dir)
    run_update_toponode_addresses_for_stage(stage_dir)
    run_clone_index_pool_data(stage_dir)
