GTFS Module Roadmap¶
This document outlines the planned improvements and the recommended development workflow for the GTFS module.
Planned Improvements¶
While this module is under development, it can certainly be used for basic purposes. It currently powers a number of transit sites and web applications. Further work needs to be done on:
- Automatic updating of GTFS entities: Implementing a mechanism to automatically pull and sync data from GTFS feeds.
- Completion of GTFS file entities: Ensuring all files specified in the GTFS standard have corresponding Drupal entities.
- Fare Leg Rule Implementation: Complete the remaining fields for Fare Leg Rules (see GTFS Reference). (
modules/gtfs_fares/src/Entity/FareLegRule.php) - GTFSRow Filename Logic: Refactor
GTFSRowto include filename in its logic. (src/Entity/GTFSRow.php) - WKT Support: Implement WKT (Well-Known Text) in
GeodataInterface. (src/Entity/GeodataInterface.php) - Location GeoJSON Support: Account for
locations.geojsoninStopTime. (src/Entity/StopTime.php) - GeoJSON Caching: Implement a caching strategy for GeoJSON tagged with
gtfs_rowID for proper invalidation. (src/Entity/HasGeodata.php) - GTFSRowLinks Troubleshooting: Fix parent link issues in
GTFSRowLinks. (src/Plugin/Derivative/GTFSRowLinks.php) - Alias Type Logic: Complete the implementation of
GtfsRowAliasType. (src/Plugin/pathauto/AliasType/GtfsRowAliasType.php) - Stop Route List Extensions: Extend
StopRouteListResourceto include child stops. (src/Plugin/rest/resource/StopRouteListResource.php) - Schedule Calendar Dates: Account for calendar dates in
ScheduleController. (src/Controller/ScheduleController.php) - Schedule Refactoring: Refactor schedule logic to a native method. (
src/Controller/ScheduleController.php) - ~~Stop lookup: Add a way to find a stop without knowing its ID — by name fragment and by proximity to a coordinate.~~ Done.
StopLookupanswers it in PHP;stops/nearbyandstops/searchexpose it. Proximity needs the composite(stop_lat, stop_lon)index added bygtfs_update_10010.
Recommended Development Workflow (Future)¶
To ensure code quality and stability as the project grows, we recommend adopting the following feature branch workflow:
- Work on a Feature Branch: Always create a new branch for your changes (e.g.,
feature/my-new-improvement). Commit and push your changes freely to this branch. - Open a Merge Request: Once your work is ready for review, open a Merge Request (MR) in GitLab. This will automatically trigger the GitLab CI pipeline to run the test suite.
- Merge Checks: Ensure that the GitLab project is configured with "Pipelines must succeed" enabled under Settings > Merge requests. This prevents code from being merged into the main branch until the tests pass.
- Local Testing: To save time and CI resources, run tests locally before pushing:
./vendor/bin/phpunit -c phpunit.xml web/modules/composer/gtfs/tests/