JSON > + direction_id_use_other_trips_with_same_headsign #sncf#80
JSON > + direction_id_use_other_trips_with_same_headsign #sncf#80mmathieum wants to merge 6 commits into
JSON > + direction_id_use_other_trips_with_same_headsign #sncf#80Conversation
There was a problem hiding this comment.
Pull request overview
Adds an opt-in GTFS parsing step to infer and fill missing trips.direction_id values by looking at other trips on the same route with the same trip_headsign, aligning with the PR goal of reducing missing direction IDs (e.g., SNCF feeds).
Changes:
- Introduces
GSpec.fixMissingTripDirectionIds()(guarded bydirection_id_use_other_trips_with_same_headsign) and wires it into the parser startup flow. - Extends route JSON config (
RouteConfig) with a new opt-in flag to enable this behavior. - Minor logging/formatting adjustments and a small iteration refactor.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/mtransit/parser/mt/MDirectionHeadSignFinder.kt | Tweaks debug log message formatting for headsign/merge diagnostics. |
| src/main/java/org/mtransit/parser/gtfs/data/GTrip.kt | Refactors list-update iteration style for trip updates. |
| src/main/java/org/mtransit/parser/gtfs/data/GSpecExt.kt | Adds opt-in direction-id auto-fix logic based on same-route same-headsign trips. |
| src/main/java/org/mtransit/parser/gtfs/data/GSpec.java | Exposes route-id enumeration for trips and includes minor formatting updates. |
| src/main/java/org/mtransit/parser/DefaultAgencyTools.java | Calls the new direction-id auto-fix step during parsing startup. |
| src/main/java/org/mtransit/parser/config/gtfs/data/RouteConfig.kt | Adds new JSON config flag direction_id_use_other_trips_with_same_headsign. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…d_use_other_trips_with_same_headsign
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Try to fix missing trips.direction_id when other route trips with same head-sign have a direction_id...