Repository navigation
18 fastapi wire api endpoints to oriondb - #42
Merged
Merged
Conversation
TKDPenguin
reviewed
Oct 11, 2026
TKDPenguin
reviewed
Oct 11, 2026
TKDPenguin
reviewed
Oct 11, 2026
TKDPenguin
reviewed
Oct 12, 2026
TKDPenguin
reviewed
Oct 12, 2026
TKDPenguin
reviewed
Oct 12, 2026
This reverts commit 3b574f1.
TKDPenguin
reviewed
Oct 14, 2026
Collaborator
|
Looks good to me! |
shreya-m9
self-requested a review
October 14, 2026 22:25
TKDPenguin
approved these changes
Oct 15, 2026
TKDPenguin
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me. Just make sure you handle the merge conflict before you merge
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.
Overview
Connects GET /api/races and GET /api/races/{id}/laps/{lap}/positions to OrionDB, replacing hardcoded stubs with live queries to races and estimated_positions.
Technical Description
Added a FastAPI database dependency backed by a shared SQLAlchemy engine and injected connections into the wired route handlers. The race repository now queries the races table, while the positions repository queries estimated_positions by race and lap, with optional latitude/longitude bounds and timestamp ordering.
The service layer checks that a requested race exists before querying positions, allowing a valid race with no position data to return [] while an invalid race returns 404. Database-specific exceptions are converted into OrionDB errors and then into clean HTTP responses by FastAPI.
How Has This Been Tested?
Automated and Live Tests that cover
Ticket Review
Answer the following: