Explanation of the README.md:
- Project Structure: Outlines the files and their purpose.
- Files and their Contents: Provides a detailed explanation of each file, including its contents and purpose.
- Example CSV Files: Shows examples of how
hostel_info.csv
andgroup_info.csv
should be structured. - How to Run the Project: Provides a step-by-step guide on how to run the application.
- Contributions: Encourages contributions from others.
- License: Specifies the license under which the project is released.
This project implements a simple room allocation system for a hostel, taking into account group gender and room capacity.
- index.html: The main HTML file containing the user interface for uploading CSV files and viewing the allocation results.
- app.py: The Flask application that handles file uploads, room allocation logic, and result display.
- hostel_info.csv: A CSV file containing information about available rooms in the hostel.
- group_info.csv: A CSV file containing information about the groups to be allocated.
- allocations/allocation.csv: A CSV file generated by the application, containing the room allocation results.
This file contains the HTML structure for the user interface. It provides:
- A form for uploading two CSV files:
group_info.csv
: Information about the groups to be allocated.hostel_info.csv
: Information about the available rooms.
- A button to trigger the upload and allocation process.
- A link to download the generated
allocation.csv
file.
This file implements the Flask application, which performs the following tasks:
- File Uploads: Handles the upload of
group_info.csv
andhostel_info.csv
. - Room Allocation: Implements the core logic for allocating groups to rooms based on gender and capacity.
- Result Generation: Creates
allocation.csv
containing the allocation results. - Result Display: Shows the allocation results in an HTML table.
- Download: Allows users to download
allocation.csv
.
This file stores information about available rooms in the hostel. It has the following columns:
- Hostel Name: The name of the hostel.
- Room Number: A unique identifier for each room.
- Capacity: The number of people a room can accommodate.
- Gender: The gender assigned to the room (e.g., 'Boy', 'Girl', or 'Mixed').
Example hostel_info.csv
:
Hostel Name,Room Number,Capacity,Gender
Hostel A,A101,3,Boy
Hostel A,A102,4,Girl
Hostel B,B201,3,Boy
Hostel B,B202,2,Girl
`group_info.csv`: A CSV file containing information about the groups to be allocated.
**Example `group_info.csv`:**
Group ID,Members,Gender
101,3,Boys
102,4,Girls
103,2,Boys
104,5,Girls
105,8,5 Boys & 3 Girls
`allocations/allocation.csv`: A CSV file generated by the application, containing the room allocation results.