"""Event-level transforms (count by type, dedup, partition).

Lesson 01 lands a pandas implementation that emits a CSV. Lesson 02
switches the output to partitioned Parquet via pyarrow. Lesson 06 makes
the write idempotent. Lesson 07 layers SQL transforms alongside.

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

from __future__ import annotations


def count_by_type(input_path: str, output_path: str) -> dict[str, int]:
    """Group gharchive events by ``type`` and count.

    Args:
        input_path: ``.json.gz`` file produced by ``extract.gharchive``.
        output_path: CSV (L01) or Parquet (L02+) target.

    Returns:
        Mapping from event type to count.

    Raises:
        NotImplementedError: until Lesson 01 fills this in.
    """
    raise NotImplementedError(
        "count_by_type is a Plan-A stub; Lesson 01 fills this in."
    )


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


if __name__ == "__main__":
    main()
