How anton325/carpool works
Project Type and Purpose
• This is a standalone Python desktop application with a GUI front end.
• Purpose: load rider sign-up data from a Google-Form–exported Excel file, automatically assign riders to drivers by location, allow manual overrides, and prepare per-car group messages for iMessage.
File Structure
• Top-level scripts:
• gui.py – constructs and drives the user interface
• main.py – application entry point (invokes GUI)
• importTable.py – loads and parses the Excel sign-up sheet
• algorithm.py – assignment logic (location clustering and matching)
• person.py – data model representing riders and drivers
• textmessage.txt – template for generating group messages
• assets/ – UI mockups/screenshots used by gui.py
• responses.xlsx – sample payload from Google Forms
• requirements.txt – Python dependencies
Extract Insights from the README
• UI flow is three phases:
a. Start Screen: load Excel, customize outgoing message
b. Assignment Screen: run automatic matching, allow add/remove/reassign
c. Final Screen: display per-car phone lists for message copying
• No external services called at runtime other than file I/O; final message step is manual (iMessage).
Main Components and Their Interactions
a. Components
• User / GUI Layer (gui.py)
• Data Import Module (importTable.py)
• Domain Model (person.py)
• Assignment Engine (algorithm.py)
• Message Generator (textmessage.txt parser)
• File System (Excel in/out, templates)
• External Systems: Google Forms (pre-runtime), iMessage (post-runtime manual)
b. Relationships / Data Flows
1. User launches main.py → initializes GUI.
2. GUI “Load” action → Import Module reads responses.xlsx → Domain Model objects.
3. GUI passes model list to Assignment Engine → returns groupings.
4. GUI displays auto-assigned groups → user may invoke GUI methods to adjust (add/remove/reassign), updating the Domain Model.
5. GUI invokes Message Generator → reads textmessage.txt, merges with group data → renders phone-number lists.
6. User copies lists and pastes into iMessage.
c. Architectural Patterns
• MVC-like separation: gui.py (View+Controller), person.py (Model)
• Pipeline pattern: Import → Transform (Model) → Process (Algorithm) → Export (Message)
d. Key Technologies
• Python 3.x
• GUI library (e.g., Tkinter or PySimpleGUI – as imported in gui.py)
• openpyxl or pandas (for Excel parsing in importTable.py)