How nyasha2/missminutes works
Project type and purpose
• This is primarily a Python scheduling library ("missminutes") that implements constraint‐based task scheduling.
• It includes two CLI/demo scripts (demo_caltech_schedule.py, demo_simple_schedule.py) and a lightweight web demo (demo/server.py + HTML/CSS/JS).
• Purpose: Provide a reusable scheduler engine + optional demos that let users interact via command line or browser.
File structure
Top‐level
• missminutes/ ← core scheduling engine (modules for constraints, events, tasks, time domains, time profiles, solver)
• demo/ ← web demo app
– server.py ← small HTTP server (Flask or built‐in) exposing HTML templates + static assets
– templates/ ← HTML views (calendar.html, plan.html)
– static/ ← client‐side assets (components, JS, CSS)
• demo_*.py ← CLI entry points for example schedules
• requirements.txt ← Python dependencies
Patterns
• Core library is modular Python package (separation by domain concerns)
• Demo follows simple MVC: server (controller) → templates (view) + static (view assets)
README for additional insights
• Emphasizes automated scheduling with multiple constraints.
a. Main components
1. CLI / Demo Scripts
• demo_simple_schedule.py
• demo_caltech_schedule.py
2. Web Demo
• Server (demo/server.py)
• Templates (demo/templates)
• Static Frontend (JS/CSS/components)
3. Core Library (missminutes package)
• Constraint Solver (constraint_solver.py)
• Scheduler (scheduler.py)
• Domain Models:
– Events (events.py)
– Tasks (tasks.py)
– Tags (tags.py)
– Time Domain (timedomain.py)
– Time Profiles (timeprofile.py)
4. External / Runtime
• Python Interpreter
• Browser (for web demo)
• Data input (e.g., JSON/CSV or CLI arguments)
b. Relationships & interactions
• CLI scripts import & invoke missminutes.scheduler → constraint_solver → produce schedule → print to console
• Web demo: Browser issues HTTP requests → server.py routes → calls missminutes API → retrieves scheduling results → renders via templates + JS
• Constraint Solver module collaborates with domain model modules (events, tasks, timedomain, timeprofile)
c. Architectural patterns & design principles
• Modular library design: each domain concept in its own module
• Separation of concerns: core engine decoupled from any UI
• Demo uses MVC (server/controller, templates/view, static assets)
• The scheduling engine itself likely follows pipeline stages (parse input → build constraint graph → solve → output)
d. Key technologies/frameworks
• Python 3.x
• Jinja2 (if demo/templates use template engine)
• Vanilla JS + HTML/CSS for client
• (Optional) Flask or built‐in HTTPServer in server.py
Detailed element checklist
• Core library boundary
• Individual modules inside library
• Entry‐points (CLI scripts, server)
• Web frontend stack (templates + static folder)
• Data flow from user input to schedule output
• Annotations for key technologies (e.g., “uses Jinja2”, “vanilla JS”)