Skip to content

Compat w/ latest update#1

Merged
mmathieum merged 2 commits intomasterfrom
mm/json_config_cleanup
Mar 3, 2026
Merged

Compat w/ latest update#1
mmathieum merged 2 commits intomasterfrom
mm/json_config_cleanup

Conversation

@mmathieum
Copy link
Copy Markdown
Member

No description provided.

@mmathieum mmathieum self-assigned this Mar 3, 2026
@mmathieum
Copy link
Copy Markdown
Member Author

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the configuration and parsing mechanisms for the Guelph Transit Bus agency. It transitions from a custom Java class to a declarative JSON-based system for defining agency and route-specific rules, enhancing maintainability and consistency. Concurrently, it cleans up associated Android resource files by removing deprecated or externalized configurations, ensuring the application remains compatible with the latest updates and follows a more standardized approach to data processing.

Highlights

  • Architectural Refactoring: The custom Java parsing logic for Guelph Transit Bus (GuelphTransitBusAgencyTools.java) has been entirely removed and replaced with a new, declarative JSON-based configuration system. This significantly streamlines how agency-specific parsing rules are defined and maintained.
  • Configuration Modernization: New JSON configuration files (agency.json, route.json) were introduced to manage GTFS agency and route-specific settings, including route ID mappings, cleaning rules for names and headsigns, and route colors. This centralizes and standardizes configuration.
  • Android Resource Cleanup: Several redundant or now-externalized configuration entries were removed from Android resource XML files (gtfs_real_time_values.xml, rss_values.xml, twitter_values.xml), simplifying these files and aligning them with the new configuration approach.
  • GTFS Real-Time Database Version Update: The GTFS Real-Time database version was updated to 20260303 in gtfs_rts_values.xml, indicating a new data release or schema change.
Changelog
  • agency-parser/parser_class
    • Removed reference to the old Guelph Transit Bus agency tools class.
  • agency-parser/src/main/java/org/mtransit/parser/ca_guelph_transit_bus/GuelphTransitBusAgencyTools.java
    • Removed the entire custom Java class responsible for Guelph Transit Bus agency parsing logic, including route ID conversions, name cleaning, and color definitions.
  • app-android/src/main/res/values/gtfs_real_time_values.xml
    • Removed various GTFS Real-Time configuration entries such as gtfs_real_time_db_version, gtfs_real_time_for_poi_authority, gtfs_real_time_stop_id_is_stop_code, gtfs_real_time_route_id_is_route_short_name, gtfs_real_time_agency_bold_words, gtfs_real_time_agency_extra_languages, gtfs_real_time_agency_extra_bold_words, gtfs_real_time_agency_time_ampm_format, and gtfs_real_time_agency_time_zone.
  • app-android/src/main/res/values/gtfs_rts_values.xml
    • Updated the gtfs_rts_db_version from 20260127 to 20260303.
    • Removed the gtfs_status_for_poi_authority string resource.
  • app-android/src/main/res/values/rss_values.xml
    • Removed rss_db_version, rss_target_for_poi_authority, rss_color, rss_copy_to_file_instead_of_streaming, and rss_encoding.
    • Removed rss_feeds_lang, rss_feeds_colors, rss_feeds_target, rss_feeds_severity, rss_feeds_ignore_guid, and rss_feeds_ignore_link arrays.
  • app-android/src/main/res/values/twitter_values.xml
    • Removed twitter_db_version and twitter_target_for_poi_authority.
  • config/gtfs/agency.json
    • Added a new JSON configuration file for agency-level GTFS settings, including target route type, default color, and default string cleaner enablement.
  • config/gtfs/route.json
    • Added a new JSON configuration file for route-specific GTFS settings, including route ID mappings, short name and long name cleaning rules, direction finder enablement, trip headsign cleaners, and stop name cleaners. This file also includes specific dates for allowing non-descriptive headsigns for certain routes.
  • config/source_url
    • Added a new file to specify the GTFS data source URL.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

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

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 migrates the Guelph Transit agency from a custom Java parser to a new JSON-based configuration. This is a significant refactoring that removes the old Java code and introduces new JSON files to define the agency's behavior. The migration appears to be mostly successful, but I've found a significant regression: the logic for assigning specific colors to different bus routes has been lost. This will result in all routes using the default agency color. My review includes a detailed comment on how to restore this functionality. The other changes involve cleaning up Android resource files, which seem appropriate for a compatibility update.

Comment thread config/gtfs/route.json
@mmathieum mmathieum marked this pull request as ready for review March 3, 2026 14:23
@mmathieum mmathieum merged commit 352f5a4 into master Mar 3, 2026
1 of 3 checks passed
@mmathieum mmathieum deleted the mm/json_config_cleanup branch March 3, 2026 20:07
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