"""gharchive.org extractor.

Lesson 01 fills this module with a 50-line script that downloads one
hour of gharchive data (a ~50 MB gzipped JSON file from
https://data.gharchive.org/YYYY-MM-DD-H.json.gz) and writes it to
`data/raw/`. Lesson 02 swaps the CSV output for Parquet.

This Plan-A skeleton just refuses to run.
"""

from __future__ import annotations


def fetch_hour(hour: str, out_dir: str = "data/raw") -> str:
    """Download one hour of gharchive data.

    Args:
        hour: e.g. ``"2024-01-01-15"``.
        out_dir: directory for the downloaded ``.json.gz`` file.

    Returns:
        Absolute path to the downloaded file.

    Raises:
        NotImplementedError: until Lesson 01 fills this in.
    """
    raise NotImplementedError(
        "fetch_hour is a Plan-A stub; Lesson 01 of the Data Engineering "
        "course fills this in."
    )


def main() -> None:
    raise SystemExit(
        "extract.gharchive has no implementation yet - start at lesson 01 "
        "of the Data Engineering course."
    )


if __name__ == "__main__":
    main()
