Skip to content

Initial schema update for Flex#530

Merged
irees merged 41 commits intomainfrom
flex-graphql
Dec 9, 2025
Merged

Initial schema update for Flex#530
irees merged 41 commits intomainfrom
flex-graphql

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Dec 4, 2025

Begin adding support for Flex models in GraphQL.

closes interline-io/calact-network-analysis-tool#225

@interline-io interline-io deleted a comment from github-actions bot Dec 4, 2025
drewda added a commit to interline-io/calact-network-analysis-tool that referenced this pull request Dec 4, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 6, 2025

Generated Code Check ✅

All generated code is up to date.

vars: hw{"lat": sanJoseFocus.Lat, "lon": sanJoseFocus.Lon},
selector: "agencies.#.feed_version.feed.onestop_id",
selectExpect: []string{"CT", "BA", "HA"},
selectExpect: []string{"CT", "BA", "HA", "ctran-flex"},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct? shouldn't ctran-flex come before HA?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

Generated Code Check ✅

All generated code is up to date.

@irees irees marked this pull request as ready for review December 9, 2025 08:04
Copilot AI review requested due to automatic review settings December 9, 2025 08:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces initial GraphQL schema support for GTFS Flex, adding three new core entity types (Location, LocationGroup, and BookingRule) along with FlexStopTime (an alias of StopTime for flex services). The implementation follows the repository's established patterns for adding new GTFS entities, including complete resolver chains, database finders, data loaders, and comprehensive test coverage.

Key Changes:

  • Added GTFS Flex entity types: Location, LocationGroup, BookingRule, and FlexStopTime
  • Extended StopTime with flex-specific fields (pickup/drop-off windows, booking rules)
  • Integrated new test feed (ctran-flex) with 1,389 additional trips and 293 stops
  • Added comprehensive resolver tests following established testing patterns

Reviewed changes

Copilot reviewed 47 out of 48 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testdata/server/server-test.dmfr.json Added ctran-flex test feed configuration
server/model/models.go Added Location, BookingRule, LocationGroup, FlexStopTime models
server/model/models_gen.go Generated filter types for new entities
server/model/finders.go Added finder interface methods for new entities
server/finders/dbfinder/*.go Implemented database queries for Location, LocationGroup, BookingRule
server/finders/dbfinder/stop_time.go Extended stop_time queries for flex entities (location, location_group)
server/finders/rtfinder/*.go Added FeedVersionTimezone lookup for flex stop times
server/gql/*_resolver.go Implemented resolvers for new entities and relationships
server/gql/loaders.go Added data loaders for batching flex entity queries
server/gql/*_resolver_test.go Updated test expectations and added comprehensive flex tests
server/gql/RESOLVER_*_GUIDE.md Added comprehensive documentation for resolver patterns
schema/graphql/schema.graphqls Added GraphQL schema definitions for flex entities
ext/builders/convex_hull_builder.go Extended to include location geometries in feed convex hulls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@irees irees merged commit 140490c into main Dec 9, 2025
12 checks passed
@irees irees deleted the flex-graphql branch December 9, 2025 08:08
irees added a commit to interline-io/calact-network-analysis-tool that referenced this pull request Dec 11, 2025
* stubbing out Flex Services tab using canned WSDOT geojson

related to #227

* lint

* dependencies

* move geojson handling into scenario and BEFE endpoint

* wiring up to interline-io/transitland-lib#530

* status modal

* default to load flex, but give option to skip

* time frame filtering for flex

* marked/unmarked for filters on flex areas

* lint

* click to identify overlapping areas

* expose `prior_notice_service` and expand Reports table

* improve Advanced Settings panel

* report options

* separate maplibre layers for marked/solid stroke and unmarked/dashed stroke areas

* update to use updated resolver

* removing old comments

* simplify

* data availability indicators

* use the new max limit for locations

* dataDisplayMode=area

* show/hide flex on the map independently of Report grouping mode

* consolidate some computed props

* tighter spacing

* remove an old comment

* one parseHMS

* escape HTML

* sanitize URLs that are presented to users

* Delete

* Hold off on rendering schedule on map until completed

* Loading panel improvements

* Persist selected bbox

* Map highlight

* Fix rendering

* Display flex (by default) if fixed-route is not selected

* Fix

* Fixes

* Address PR comments

* Address more PR comments

* Address comment

* Merge flex into tl

* Remove sanitizeUrl, use existing practices

* Import fixes

* Address more comments

* Remove unused

---------

Co-authored-by: Ian Rees <[email protected]>
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.

add support to transitland-server for GTFS Flex

3 participants