Skip to content

Implement bus shift management (BusShift and BusStop)#67

Open
lfremy wants to merge 1 commit intoOptiways:masterfrom
lfremy:master
Open

Implement bus shift management (BusShift and BusStop)#67
lfremy wants to merge 1 commit intoOptiways:masterfrom
lfremy:master

Conversation

@lfremy
Copy link

@lfremy lfremy commented Jan 8, 2026

Implemented models:

  • BusShift
  • BusStop:
  • Computed properties: departure_time, arrival_time, total_duration

Business constraints:

  • Minimum 2 stops per shift (validation at FormSet and model level)
  • Bus/driver overlap detection via validation in BusStop.clean()

Django admin interface:

  • BusShiftAdmin with list_display of key information
  • BusStopInline using TabularInline for intuitive stop management Unit tests:
  • Test minimum 2 stops validation
  • Test bus overlap detection
  • Test driver overlap detection

Makefile:

  • Added migrate, makemigrations, test, create_admin commands

Documentation:

  • DECISIONS.md file detailing technical choices and considerations

Implemented models:
- BusShift
- BusStop:
- Computed properties: departure_time, arrival_time, total_duration

Business constraints:
- Minimum 2 stops per shift (validation at FormSet and model level)
- Bus/driver overlap detection via validation in BusStop.clean()

Django admin interface:
- BusShiftAdmin with list_display of key information
- BusStopInline using TabularInline for intuitive stop management
Unit tests:
- Test minimum 2 stops validation
- Test bus overlap detection
- Test driver overlap detection

Makefile:
- Added migrate, makemigrations, test, create_admin commands

Documentation:
- DECISIONS.md file detailing technical choices and considerations
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