Conversation
…as HH:MM:SS; validate stop_id; add Fuseki flags and DAL docs; add /api/schedule/departures/ endpoint
…tures endpoint; tests(api): add tests for DAL-backed schedule departures
…sts package __init__
…CACHE_TTL_SECONDS and pass via factory
…test; add tiny TTL sample
…add Fuseki dev guide and update README/architecture; fix duplicate FUSEKI_ENDPOINT
…tion (LimitOffsetPagination, page size 50)\n- Add /api/alerts route (ServiceAlertViewSet)\n- Add /api/arrivals endpoint integrating with ETAS_API_URL (Project 4)\n- Add /api/status endpoint reporting DB/Redis/Fuseki health\n- Update OpenAPI (datahub.yml) for pagination + new endpoints
…vals endpoint tests with mocked upstream
…ema to drf-spectacular
…Message, StopTimeUpdate to real model fields
…, stop-time-updates), pagination, OpenAPI docs, ETAs config, and testing instructions
…rules, feed-messages, stop-time-updates; polish examples for core endpoints
- Remove Fuseki Docker service from docker-compose.yml - Remove fuseki_data volume - Delete storage/fuseki_schedule.py implementation - Delete api/tests/test_fuseki_schedule.py integration tests - Remove docker/fuseki/ configuration directory - Remove docs/dev/fuseki.md documentation - Update storage/factory.py to use only PostgreSQL repository - Remove FUSEKI_ENABLED and FUSEKI_ENDPOINT from settings.py - Remove Fuseki environment variables from .env.local.example - Update README.md and docs/architecture.md to remove Fuseki references PostgreSQL with Redis caching is now the sole storage backend.
- Document Data Access Layer implementation - Document new /api/schedule/departures/ endpoint - Document Redis caching configuration - Document Fuseki removal - Follow Keep a Changelog format
- Add class-level docstring explaining DAL testing - Document setUp method for test data preparation - Add docstrings for test_returns_404_when_stop_missing - Add docstrings for test_returns_departures_with_expected_shape - Improve test readability and maintainability
- Document test structure and organization - Explain test coverage for schedule departures endpoint - Provide examples for running tests - Document test data setup approach - Add guidelines for adding new tests
- Document /api/arrivals/ endpoint with ETA service integration - Document /api/status/ health check endpoint - Document /api/alerts/, /api/feed-messages/, /api/stop-time-updates/ - Document global pagination implementation - Document ETAS_API_URL configuration - Document comprehensive test suite for arrivals endpoint
- Add class-level docstring explaining ETA service integration testing - Document test_arrivals_returns_expected_shape - Document test_arrivals_propagates_upstream_error - Document test_arrivals_requires_stop_id - Document test_arrivals_accepts_wrapped_results_object - Document test_arrivals_handles_unexpected_upstream_structure_as_empty_list - Document limit validation tests - Document test_arrivals_returns_501_if_not_configured
- Add test_arrivals.py documentation - Document all 9 test cases for arrivals endpoint - Add examples for running arrivals tests - Document mocked HTTP request testing approach - Update coverage section with new test areas - Add unittest.mock to dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Pull Request: API Read Endpoints (Stops, Routes, Trips, Arrivals/ETAs, Status, Alerts)
📋 Summary
Implements comprehensive API read endpoints for GTFS data access including stops, routes, trips, real-time arrival predictions, system health checks, and service alerts with global pagination support.
This PR resolves issue #27 (Read endpoints: stops, routes, trips, arrivals/ETAs, status, alerts)
✨ Features Added
🚀 New API Endpoints
GET /api/arrivals/ - Real-time arrival predictions from external ETA service
ETAS_API_URLstop_id(required),limit(1-100)GET /api/status/ - System health check endpoint
GET /api/alerts/ - Service alerts from GTFS Realtime
GET /api/feed-messages/ - GTFS Realtime feed messages
GET /api/stop-time-updates/ - Real-time stop time updates
Core GTFS Read Endpoints (via DRF ViewSets)
📄 Pagination
LimitOffsetPaginationenabled (page size 50)⚙️ Configuration
ETAS_API_URLenvironment variable for external ETA service integration/api/arrivals/returns 501 Not Implemented🧪 Testing
unittest.mock{"results": [...]})📚 Documentation
📝 Commits
🔍 Related Issues
Closes #27
✅ Checklist
📸 Example Usage
🎯 Next Steps
After merging, the following branches will need to be rebased/merged to include these changes:
feature/search-health-endpointsfeature/auth-rate-limitsfeature/client-management