Skip to content

feature: add hotel management system#263

Open
Chirantan112 wants to merge 5 commits into
komalharshita:mainfrom
Chirantan112:feature/hotel-management
Open

feature: add hotel management system#263
Chirantan112 wants to merge 5 commits into
komalharshita:mainfrom
Chirantan112:feature/hotel-management

Conversation

@Chirantan112
Copy link
Copy Markdown

@Chirantan112 Chirantan112 commented May 18, 2026

Summary

This PR implements the Python-based Hotel Management System Starter as proposed in issue #204. It provides a structured, medium-difficulty learning project for the starter_code library, focusing on real-world logic like room inventory management and guest data validation.

Related Issue

Closes #204

Type of Change

  • Feature — adds a new educational project to the starter_code library
  • Documentation — includes structured learning goals and a step-by-step roadmap
  • Style — clean, PEP8 compliant code formatting

What Was Changed

File Change made
starter_code/hotel_management.py Implementation of a 40-room management system with tiered pricing, booking validation, and search filters.

Key Features Implemented

  • Interactive CLI Interface: A command-line menu system for easy navigation and user interaction.
  • Dynamic Room Inventory: Automatically initializes 40 rooms across Standard, Deluxe, and Suite tiers.
  • State Management: Utilizes nested dictionaries to track availability and guest details in real-time.
  • Validation Logic: * Validates 10-digit phone numbers for guest registration.
    • Restricts bookings to a maximum of 30 days to prevent business logic errors.
  • Filter Engine: Users can search for available rooms specifically by their category type.

How to Test This PR

  1. Navigate to the directory: cd starter_code
  2. Run the script: python hotel_management.py
  3. Verify Business Rules:
    • Test Case 1: Attempt to book a room with an 8-digit phone number (Expected: Error).
    • Test Case 2: Attempt to book a room for 31+ days (Expected: Blocked).
    • Test Case 3: Verify the total bill calculation accurately reflects the nightly rate for the selected category.

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines.
  • My code follows the repository's structured comment format (Header, Goals, Roadmap).
  • I have tested the script locally in PowerShell on Windows.
  • I have run flake8 . locally and fixed any linting errors.
  • I have removed all unnecessary print() debug statements.

Notes for Reviewer

This PR successfully fulfills the requirements outlined in the project proposal (#204). The code is modular and follows the educational style of the existing grade_manager.py to ensure consistency for new contributors.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@Chirantan112 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@komalharshita
Copy link
Copy Markdown
Owner

@Chirantan112 ensure that all checks pass before merging

komalharshita
komalharshita previously approved these changes May 19, 2026
Copy link
Copy Markdown
Owner

@komalharshita komalharshita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good contribution overall. The Hotel Management System project is a useful addition to DevPath and fits well within the repository’s educational/project-learning goals.

The project structure, roadmap, features, and starter code organization are all well scoped for beginners/intermediate learners practicing data management and application logic concepts.

The PR is clean, properly linked to the issue, and avoids unrelated modifications.

Minor future suggestion: slightly clarify the intended implementation type (CLI/web/GUI) in the description and ensure the starter template remains beginner-friendly rather than overly complete.

Approved for merge.

@Chirantan112
Copy link
Copy Markdown
Author

Hi @komalharshita, thank you for the approval! I noticed that the CI checks were failing due to a universal bug in tests/test_basic.py (the test_health_check is missing a required argument).

I have raised Issue #344 to document this and submitted PR #345 to fix it. Once the test fix is merged, the checks for this project will pass. I've also updated the project description to clarify that this is a CLI-based implementation as suggested!

Updated the project header in hotel_management.py to explicitly state that this is a CLI (Command Line Interface) implementation. This addresses the maintainer's feedback regarding clarity for beginner/intermediate learners.
@Chirantan112
Copy link
Copy Markdown
Author

Hi @komalharshita, I've updated the file header and description to clarify this is a CLI implementation as suggested. Thank you for the approval!"

Replaced all occurrences of the ₹ symbol with 'Rs.' throughout hotel_management.py. 

This change ensures the code is compatible with standard ASCII/UTF-8 encoding used by GitHub Actions and various terminal environments, preventing potential build failures or display errors during automated testing.
@Chirantan112
Copy link
Copy Markdown
Author

Hi @komalharshita, sorry for the confusion! My recent push dismissed your previous approval. Could you please take a quick look and re-approve if everything looks good?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc-2026 level:intermediate need review Further information is requested quality:clean type:docs Improvements or additions to documentation type:feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Project]: Add Python-based Hotel Management System Starter

2 participants