from __future__ import annotations

import os
from pathlib import Path

import pytest


@pytest.fixture(scope="session")
def source_root() -> Path:
    configured = os.environ.get(
        "CROWLEY_DIARY_SOURCE",
        "/Users/johncrowley/Downloads/diary_ocr_package",
    )
    path = Path(configured)
    if not (path / "manifest.json").is_file():
        pytest.skip("Crowley OCR source package is not available")
    return path

