from pathlib import Path


class DatasetPaths:
    """
    Represents the file paths for a dataset directory:

    ├── dataset.toml
    └── metric.py       # optional custom metric script
    """

    MANIFEST_FILENAME = "dataset.toml"
    METRIC_FILENAME = "metric.py"

    def __init__(self, dataset_dir: Path | str):
        self.dataset_dir = Path(dataset_dir).resolve()

    @property
    def manifest_path(self) -> Path:
        """Path to the dataset.toml manifest file."""
        return self.dataset_dir / self.MANIFEST_FILENAME

    @property
    def metric_path(self) -> Path:
        """Path to the metric.py custom metric script."""
        return self.dataset_dir / self.METRIC_FILENAME
