#!/usr/bin/env python3
"""Run the frozen Study 2 code with a package-local data directory."""

from __future__ import annotations

import argparse
from pathlib import Path
import sys


HERE = Path(__file__).resolve().parent
FROZEN = HERE / "frozen"
sys.path.insert(0, str(FROZEN))

import run_study2  # noqa: E402


def main() -> None:
    parser = argparse.ArgumentParser(add_help=False)
    parser.add_argument("--data-dir", type=Path, required=True)
    known, remaining = parser.parse_known_args()
    run_study2.DATA_DIR = known.data_dir.resolve()
    sys.argv = [sys.argv[0], *remaining]
    run_study2.main()


if __name__ == "__main__":
    main()
