Skip to content

Repository files navigation

Logo

Automated Seat Allocation System

An automated system used for Seat Allocation in the Counselling Process, consisting of a Backend Algorithm and a Graphical User Interface used to interact with it.

Python GUI: PyQt5 Data: pandas Excel: openpyxl


📌 Table of Contents

🚀 Execution Guide

Follow this process to Execute the Project.

  • First make sure that git is Installed.

Clone the Repository

  1. git clone https://github.com/faran4/seatAllocationSystem.git
    

Navigate to the Directory

  1. Make sure you are Inside seatAllocationSystem directory where pyproject.toml is visible.
    cd seatAllocationSystem
    

Option A: One-step install

Run the installer for your OS — it creates a dedicated virtual environment, installs the project in editable mode (pip install -e .), and adds a Seat Allocation System launcher to your Desktop.

  • Windows:

    powershell -ExecutionPolicy Bypass -File .\install.ps1

    Creates a Desktop shortcut (.lnk).

  • macOS:

    1. Make the install/uninstall scripts executable (file permissions don't always survive a download/clone):
      chmod +x install_macos.sh uninstall_macos.sh
    2. ./install_macos.sh
      Creates a Desktop app bundle (Seat Allocation System.app).

    If you still get a "bad interpreter" error, the script picked up Windows-style line endings somewhere along the way (e.g. a zip download). Run this command if you see that error:

    sed -i '' 's/\r$//' install_macos.sh uninstall_macos.sh

Double-click the Desktop launcher to start the app. Since the install is editable, a later git pull takes effect immediately — just re-run the installer if dependencies changed.

To uninstall, run uninstall.ps1 (Windows) or ./uninstall_macos.sh (macOS) — this removes the virtual environment and the Desktop launcher, leaving the source code untouched. Delete the project folder yourself afterwards if you want it gone completely.

Option B: Manual setup

  1. Create a Virtual Environment if Required.
  • Windows
    python -m venv venv
    venv/Scripts/activate
  • MacOSX
    python -m venv venv
    source venv/bin/activate
    
  1. Install the project in editable mode (this also installs all dependencies from pyproject.toml). A plain pip install -r requirements.txt is not enough here — the Frontend/Backend packages live under src/, so the project itself must be installed for imports between them to resolve correctly.
    pip install -e .
    
  2. Activate Virtual Environment (if not already active) and run:
  • Windows
    venv/Scripts/activate
  • MacOSX
    source venv/bin/activate
    
  1. Execute to start:
    python -m Frontend.Main
    

📋 Preparing Master-Sheets

This section lists the required columns for each sheet (refer to the Input Excel Layout for the reference file) and the rules each column must follow.

Required Columns


Round 1


Sheet-1

  • a. Roll No.
  • b. Rank: Selected Rank (ex. S120) | Waiting Rank (ex. C0013) | empty for some students
  • c. Status: Round-1 categories (ex. SGM1, SGME, SIM1, SEB1)
  • d. Internal\External
  • e. Nomination Category 1, 2, 3: nomination categories (ex. PH, SC, ST, BC, CA, CE, DS, NC)
  • f. Preferences: branch preferences (ex. Pref-1, Pref-2, ...)

Sheet-2

  • a. Branch Names

  • b. Branch Codes

  • c. No. of seats — A (SGM1+SGME), B (SIM1), C (SEB1)

    Round 1 status columns
  • d. Total seats = A+B+C

  • e. Seats for each Nomination Category

  • f. NTotal = total sum of nomination seats (PH+SC+...)

Round N


Sheet-1 only

  • a. Roll No.
  • b. Rank: Selected Rank (ex. S120) | Waiting Rank (ex. C0013) | empty for some students
  • c. Status: Completed/Verified status for further rounds
  • d. upgradation: Yes/No, for Status = Completed
  • e. Internal\External
  • f. Nomination Category 1, 2, 3: nomination categories (ex. PH, SC, ST, BC, CA, CE, DS, NC)
  • g. Preferences: branch preferences (ex. Pref-1, Pref-2, ...)

Column Rules


Sheet-1


  1. Roll No: compulsory — every student must have one, even if their Rank is empty.
  2. Rank: a Selected Rank (ex. S120), a Waiting Rank (ex. C0013), or empty. It may only be empty if the student still has a Roll No.
  3. Status: the allowed values depend on the round —
    • Round 1: categories such as SGM1, SGME, SIM1, SEB1. These must exactly match the strings configured in the software's Settings.
    • Round N: one of completed / verified / cancelled (case-sensitive, lowercase).
      • completed → fees paid, admission confirmed.
      • verified → documents verified, not yet allocated a seat.
      • cancelled → had a seat from a previous round but is now withdrawing/revoking it.
  4. Internal\External: must be exactly I or E, matching the values configured in Settings.
  5. Upgradation: must be exactly Yes or No (case-sensitive), or empty.
  6. Nomination Category 1, 2, 3: each filled cell must follow <2-letter code><digits> (e.g. CA001, BC014), with an optional trailing $/#.⚠️ If Category 3 is filled, Categories 1 and 2 must be filled too — don't leave gaps between them.
  7. Preferences: this must be the last (rightmost) group of columns on the sheet.
    • ✅ Safest: nothing else follows the Preferences columns at all.
    • ⚠️ If something must follow them, leave one guaranteed-empty column right after the last Preference column, before any other field.

Sheet-2


  1. Branch Name: free text. Can be paired with VLOOKUP against the Round-1 Sheet-2 branch list to map downloaded preference data to the correct Branch Codes.
  2. Branch Codes: the software identifies every branch only by these codes — the exact same codes must also appear in the Preferences columns on Sheet-1.
  3. Seats for A (SGM1+SGME)
  4. Seats for B (SIM1)
  5. Seats for C (SEB1)
  6. Total = A + B + C
  7. Seats for each Nomination Category (PH, SC, ST, BC, CA, CE, DS, NC) — empty cells here are automatically converted to 0.

Note: MUST SELECT & DELETE ALL THE CELLS OF RANK FOR STUDENTS HAVING NO RANK.

Note: This auto-fill is the only safety net of its kind. Items 10–13 and 15 (A, B, C, Total, NTotal, Branch Code) are not auto-filled — leaving any of those blank silently corrupts that branch's seat count instead of raising an error.

  1. NTotal = sum of all Nomination Category seats (PH + SC + ST + BC + CA + CE + DS + NC). Double-check it actually includes PH — downloaded sheets don't assume PH as part of the NTotal.

Data Preparation Flow


Important

Follow this exact order when turning a portal download into a usable Master-Sheet:

  1. Download the raw data from the counselling portal.
  2. Filter data to keep only the required Columns.
  3. Map Preferences → Branch Codes (e.g. via VLOOKUP against the Sheet-2 branch list).
  4. Arrange the rows in this order: SelectedWaiting (C-prefixed ranks) → Non-ranked students (Any Order).

🖱️ Using the Software


The top control bar exposes six actions:

Button What it does
Settings Configure Internal/External codes, Round-1 Status categories, and the Nomination Category codes & order
Log View the terminal output for the current run - prints, warnings, and errors.
Clear Clear the current screen and restart the software.
Reset Wipe all data produced and captured so far - irreversible, use with care.
Shift Seats Shift all Nomination category seats (except PH, which is always left untouched) into either General or CE — your choice via a popup — then re-runs the allocation algorithm with the updated seats.
Execute Run the allocation algorithm for the current round.

🎥 Demo Tutorial

Click below to download a video walkthrough of the software in action: Demo Tutorial


📊 Presentation

You can view the presentation slides for this project here: Presentation


📄 Input Excel Layout

You can access the input layout Excel file used in this project here: Excel Sheet


📩 Contact


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages