Skip to content

JSON > + [keep/exclude]_routes.route_short_name_regex #NRT#79

Merged
mmathieum merged 2 commits into
masterfrom
mm/json_keep_exclude_routes_w_regex
Jul 14, 2026
Merged

JSON > + [keep/exclude]_routes.route_short_name_regex #NRT#79
mmathieum merged 2 commits into
masterfrom
mm/json_keep_exclude_routes_w_regex

Conversation

@mmathieum

Copy link
Copy Markdown
Member

No description provided.

@mmathieum mmathieum self-assigned this Jul 14, 2026
@mmathieum
mmathieum marked this pull request as ready for review July 14, 2026 13:46

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces regex-based route filtering by adding a route_short_name_regex configuration option to RouteConfig. This regex is lazily compiled and used in both keepRoutes and excludeRoutes to match route short names. The review feedback suggests ensuring the regex string is not blank before compiling to avoid unexpected matching behavior, and recommends adding unit tests to verify the new filtering logic.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/main/java/org/mtransit/parser/config/gtfs/data/RouteConfig.kt
@mmathieum
mmathieum merged commit cdfba82 into master Jul 14, 2026
4 checks passed
@mmathieum
mmathieum deleted the mm/json_keep_exclude_routes_w_regex branch July 14, 2026 13:59
mmathieum added a commit to mtransitapps/ca-welland-transit-bus-android that referenced this pull request Jul 14, 2026
montransit added a commit to mtransitapps/mtransit-for-android that referenced this pull request Jul 14, 2026
mmathieum added a commit to mtransitapps/ca-welland-transit-bus-android that referenced this pull request Jul 14, 2026
* `JSON` config...

* Sync code from 'parser': `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-gta-up-express-train-android that referenced this pull request Jul 14, 2026
- commons-android: GTFS-RT > Trip filtering > allow ignore `direction_id` when `trip_id` is provided mtransitapps/commons-android#172
- commons-android: Status > `hasData` != `!noData` ('no data' means loaded w/o data) mtransitapps/commons-android#173
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-st-hyacinthe-transport-collectif-bus-android that referenced this pull request Jul 15, 2026
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-moose-jaw-transit-bus-android that referenced this pull request Jul 15, 2026
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-mrc-nicolet-yamaska-bili-bus-android that referenced this pull request Jul 15, 2026
- commons-android: GTFS-RT > Trip filtering > allow ignore `direction_id` when `trip_id` is provided mtransitapps/commons-android#172
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
mmathieum added a commit to mtransitapps/ca-edmonton-ets-bus-android that referenced this pull request Jul 15, 2026
…er':

- commons: Gradle 9.4+ > enable parallel sync
- commons-android: GTFS-RT > Trip filtering > allow ignore `direction_id` when `trip_id` is provided mtransitapps/commons-android#172
- commons-android: Status > `hasData` != `!noData` ('no data' means loaded w/o data) mtransitapps/commons-android#173
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-ottawa-oc-transpo-bus-android that referenced this pull request Jul 17, 2026
…parser':

- commons: Build(deps): Bump com.google.ads.mediation:facebook from 6.21.0.3 to 6.21.0.4 in the ads group across 1 directory mtransitapps/commons#813
- commons: Build(deps): Bump com.google.firebase:firebase-bom from 34.15.0 to 34.16.0 in the gms group across 1 directory mtransitapps/commons#812
- commons: Build(deps): Bump com.google.devtools.ksp from 2.3.9 to 2.3.10 in the kotlin-ksp-compose group across 1 directory mtransitapps/commons#811
- commons: Gradle 9.4+ > enable parallel sync
- commons-android: GTFS-RT > Trip filtering > allow ignore `direction_id` when `trip_id` is provided mtransitapps/commons-android#172
- commons-android: Status > `hasData` != `!noData` ('no data' means loaded w/o data) mtransitapps/commons-android#173
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
montransit added a commit to mtransitapps/ca-ottawa-oc-transpo-train-android that referenced this pull request Jul 17, 2026
…parser':

- commons: Build(deps): Bump com.google.ads.mediation:facebook from 6.21.0.3 to 6.21.0.4 in the ads group across 1 directory mtransitapps/commons#813
- commons: Build(deps): Bump com.google.firebase:firebase-bom from 34.15.0 to 34.16.0 in the gms group across 1 directory mtransitapps/commons#812
- commons: Build(deps): Bump com.google.devtools.ksp from 2.3.9 to 2.3.10 in the kotlin-ksp-compose group across 1 directory mtransitapps/commons#811
- commons: Gradle 9.4+ > enable parallel sync
- commons-android: GTFS-RT > Trip filtering > allow ignore `direction_id` when `trip_id` is provided mtransitapps/commons-android#172
- commons-android: Status > `hasData` != `!noData` ('no data' means loaded w/o data) mtransitapps/commons-android#173
- commons-java: String utils > "and" -> "&" always (tests)
- commons-java: String utils > "and" -> "&" always
- parser: `JSON` > + `[keep/exclude]_routes`.`route_short_name_regex` #NRT mtransitapps/parser#79
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