Calculate optimal movie showtimes for a theater based on operating hours.
- Parse movie lists with titles, ratings, and runtimes
- Handle theater operating hours by day of week
- Calculate optimal showtimes with cleanup periods
- Support multiple movies per day
- Validate time formats and ranges
- Clone the repository:
git clone https://github.com/username/theater-showtimes.git
cd theater-showtimes
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # Unix
venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Create a movies CSV file:
Movie Title,Release Year,MPAA Rating,Run Time
Test Movie,2023,PG-13,2:00
- Create a theater hours text file:
Monday - Friday 9:00am - 11:30pm
Saturday - Sunday 12:00pm - 11:59pm
- Run the calculator:
python -m src.main movies.csv hours.txt
Run tests with pytest:
python -m pytest