00-overview¶
Generates the architecture overview (PNG & SVG) with brand icons when available.
- Outputs:
docs/architecture/exports/00-overview.png docs/architecture/exports/00-overview.svg
- Icon search path:
docs/architecture/icons/ Expected names : kafka.svg, spark.svg, postgres.svg, dbt.svg, airflow.svg,
pandas.svg, datasource.svg, analyst.svg
Missing icons gracefully fall back to built-in diagram nodes.
- Requirements (install locally):
Python 3.9+
Graphviz system package
Attributes¶
Functions¶
Module Contents¶
- 00-overview.BASE_DIR¶
- 00-overview.ICONS_DIR¶
- 00-overview.EXPORTS_DIR¶
- 00-overview.PROCESSED_DIR¶
- 00-overview.TITLE = 'Rides Analytics — Overview'¶
- 00-overview.DEFAULT_OUT_BASENAME = '00-overview'¶
- 00-overview.LBL_JDBC_UPSERT = 'JDBC upsert'¶
- 00-overview.LBL_SPARKSUBMIT = 'SparkSubmit (hourly)'¶
- 00-overview.LBL_DBT_RUN = 'dbt run + test'¶
- 00-overview.ICON_SIZE = 256¶
- 00-overview.ICON_BORDER = 6¶
- 00-overview.ICON_BORDER_ALPHA = 180¶
- 00-overview.ICON_BORDER_COLOR¶
- 00-overview.ICON_INNER_MARGIN = 12¶
- 00-overview.ICON_NAMES = ['kafka', 'spark', 'postgres', 'dbt', 'airflow', 'pandas', 'datasource', 'analyst']¶
- 00-overview.graphviz_available() bool¶
- 00-overview.ensure_dirs() None¶
- 00-overview._raw_icon_path(name: str) pathlib.Path | None¶
Return the path to a raw source icon if it exists (PNG only, per current script).
- 00-overview._process_icon(raw: pathlib.Path) pathlib.Path¶
Normalize icon to a square PNG canvas with transparent background, add a border rectangle, and cache to PROCESSED_DIR. If Pillow isn’t available, fall back to the raw icon.
- 00-overview.icon(name: str) pathlib.Path | None¶
Return a Path to a normalized, bordered icon (PNG) if available; else raw PNG; else None.
- 00-overview._node(label: str, icon_name: str, fallback_cls)¶
- 00-overview.wire_edges(nodes: Dict[str, object]) None¶
Wire edges according to the agreed overview spec. Top row (stream path): Source → Kafka → Spark Streaming → Postgres Bottom row (batch/orchestration): Airflow → Spark Batch → Postgres → dbt → Postgres → Analyst
- 00-overview.render(out_basename: str, formats: list[str]) None¶
- Render the diagram for all requested formats. Adds three rectangles (clusters):
App (outer)
Streaming Process (inner)
Batch & Orchestration (inner)
- 00-overview.main() None¶