How mitchleahy/roofrate works
Project Type and Purpose
• This is a Python‐based demo application (“RoofRate”) whose primary goal is to showcase roof‐rating models and, secondarily, to collect new roof image data for annotation.
• It is not a full multi‐service microservice deployment; rather, it is a single‐process Python app (invoked via app.py), augmented by modules for model inference, image/data processing, and cloud storage setup.
Top‐Level Components
• Application Entrypoint:
• app.py – the “main” script.
• prompt.txt – auxiliary prompt used by the app (e.g., for CLI interactions or model prompting).
• Core Modules (src/app):
• src/app/roof_processing/processing.py – routines for processing roof images (pre/post-processing).
• src/app/utils.py – shared utilities (I/O, logging, configuration).
• Data & Model Templates (templates):
• demo_data.py – example data loader or stubs.
• demo_model.py – a stub/model wrapper for the RoofRate model.
• Storage Setup (src/db):
• azure_blob_csv_setup.py – scripts to configure and write results (predictions, metadata) to Azure Blob Storage as CSV.
• Supporting Artifacts:
• scratch.ipynb – experimentation notebook.
• requirements.txt – Python dependencies.
• .GitHub/workflows/added-app_roofrate.yml – CI workflow to install, lint/test, or deploy.
External Services
• Azure Blob Storage for persisting processed outputs & CSV files.
• (Optional) CLI or interactive prompt for the user to supply new roof images.
Architectural Patterns & Design Principles
• Modular layering: Entry → Data/Model Templates → Processing → Storage.
• Separation of concerns:
• “templates” folder holds plug-and-play data/model stubs, so swapping in a new model is straightforward.
• “src/db” isolates all cloud‐storage logic.
• Single‐process orchestration with clear dataflow between modules.