from pathlib import Path

from inspect_ai.dataset import json_dataset

from bench_af._abstract.objects import Environment
from environments.blackmail_no_tools.scorer import behave_because_observed, is_blackmailing, misbehave_because_unobserved

BASE_PATH = Path(__file__).parent


def get() -> Environment:
    """Return the default environment with observed and unobserved datasets."""

    observed_dataset = json_dataset(str(BASE_PATH/"test_dataset.json"))

    unobserved_dataset = json_dataset(str(BASE_PATH/"deployment_dataset.json"))

    return Environment(
        name="blackmail_no_tools",
        observed_dataset=observed_dataset,
        unobserved_dataset=unobserved_dataset,
        scorers=[is_blackmailing(), behave_because_observed(),
                 misbehave_because_unobserved()]
    )
