"""Paths and global constants. Everything reproducible starts from SEED."""
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
DATA_RAW = ROOT / "data" / "raw"
DATA_PROC = ROOT / "data" / "processed"
MODELS = ROOT / "models"
OUTPUTS = ROOT / "outputs"
INSTANCES = ROOT / "instances"
FIXTURES = ROOT / "tests" / "fixtures"

SEED = 42

# --- data source (NYC TLC Trip Record Data) ---------------------------------
MONTH = "2022-01"
TRIP_URL = f"https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_{MONTH}.parquet"
ZONE_LOOKUP_URL = "https://d37ci6vzurychx.cloudfront.net/misc/taxi_zone_lookup.csv"
ZONE_SHAPES_URL = "https://d37ci6vzurychx.cloudfront.net/misc/taxi_zones.zip"

N_ZONES = 20                 # keep the 20 busiest zones
TARGET_TRIPS = 300_000       # subsample size after filtering
MIN_DURATION, MAX_DURATION = 1.0, 120.0   # minutes
MAX_SPEED_MPH = 60.0         # outlier filter on reported distance / duration
# split by day: first 3 weeks train (of which the last 2 days are validation), last week test
TRAIN_END = "2022-01-22"     # exclusive -> train+val = Jan 3 .. Jan 21
VAL_DAYS = ("2022-01-20", "2022-01-21")
TEST_START = "2022-01-24"    # test = Jan 24 .. Jan 31 (weekdays)

# --- van model --------------------------------------------------------------
VAN_FACTOR = 1.2             # documented assumption: van time = 1.2 x taxi time
WEEKDAY_NAMES = ["Mon", "Tue", "Wed", "Thu", "Fri"]
