Skip to content

Improve student activity registration system - #2

Merged
iscroman merged 3 commits into
mainfrom
accelerate-with-copilot
Jul 7, 2026
Merged

Improve student activity registration system#2
iscroman merged 3 commits into
mainfrom
accelerate-with-copilot

Conversation

@iscroman

@iscroman iscroman commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Now let me fetch the PR data:Based on your changes, here's a comprehensive PR description:

In a Nutshell

This PR expands the student activity management application with new features and improvements. It adds 6 new activities to the catalog, implements participant management with validation, introduces an unregister endpoint, enhances the frontend UI to display and manage participants, and includes comprehensive test coverage to ensure reliability.

Summary

Aspect Details
Changes Backend: Added 6 new activities, participant validation, DELETE endpoint for unregistering participants
Frontend: Display participants, remove button functionality, improved message styling
Testing: Added comprehensive pytest tests for all major functionality
Documentation: Updated README with testing instructions
Files Changed 7 files: src/app.py, src/static/app.js, src/static/styles.css, tests/backend/test_api.py, tests/test_app.py, requirements.txt, README.md
Lines Added/Deleted +333 lines added / ~5 lines removed
Key Features ✅ 6 new activities (Basketball, Soccer, Drama, Art, Debate, Science)
✅ Duplicate signup prevention
✅ Participant removal endpoint
✅ Real-time participant list display
✅ Comprehensive test suite (9 tests)

Changes Overview

Backend (src/app.py)

  • Added 6 new activities with full details (description, schedule, capacity, participants)
  • Added validation in signup_for_activity() to prevent duplicate signups
  • Created new DELETE /activities/{activity_name}/participants/{email} endpoint to unregister students

Frontend (src/static/app.js & src/static/styles.css)

  • Display participant list for each activity
  • Add remove buttons (×) next to each participant name with delete functionality
  • Improved message styling with consistent CSS classes
  • Reset activity dropdown after successful signup
  • Refresh activity list after participant removal

Testing (tests/backend/test_api.py & tests/test_app.py)

  • 9 comprehensive tests covering:
    • Activity retrieval
    • Successful signup
    • Duplicate signup rejection
    • 404 handling for unknown activities
    • Participant removal
    • 404 handling for missing participants
  • Fixture to preserve activity state between tests

Other

  • Added pytest to requirements.txt
  • Updated README with testing instructions

Want me to:

  1. Review the changes for potential issues or improvements?
  2. Dive deeper into specific files or functionality?
  3. Check test coverage and suggest additional test cases?

@iscroman
iscroman merged commit 7943f1d into main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant