feat(valhalla): add gtfs parsing in graph#95
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
There was a problem hiding this comment.
Pull request overview
Adds an optional GTFS download/cleaning pipeline that can run before Valhalla tile generation, enabling transit feeds to be incorporated into Valhalla graphs. It also documents the new config block and updates example docker configs accordingly.
Changes:
- Introduce
r2gg.gtfs_pipelinepackage (download, clean, optional department split, merge helper, CLI entrypoint). - Integrate GTFS preprocessing into
r2gg/_main.pyValhalla conversion and pass transit-related Valhalla build args when enabled. - Update documentation, sample configs, CI install steps, and Python dependencies to support the GTFS pipeline.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_gtfs_integration.py | Adds tests around GTFS config parsing patterns and PipelineConfig defaults. |
| requirements/base.txt | Adds new third-party dependencies needed by the GTFS pipeline. |
| README.md | Documents optional gtfs config block for Valhalla sources. |
| r2gg/gtfs_pipeline/utils/geom_utils.py | Adds GTFS stop-coverage bounds extraction helper. |
| r2gg/gtfs_pipeline/utils/file_utils.py | Adds CSV-reading helper used across pipeline modules. |
| r2gg/gtfs_pipeline/utils/init.py | Declares utils package. |
| r2gg/gtfs_pipeline/pipeline.py | Orchestrates end-to-end pipeline execution from config. |
| r2gg/gtfs_pipeline/merge_gtfs.py | Adds a utility to merge multiple GTFS feeds into a single directory with prefixed IDs. |
| r2gg/gtfs_pipeline/gtfs_departements.py | Adds optional splitting of cleaned GTFS feeds by GeoJSON features (departments). |
| r2gg/gtfs_pipeline/gtfs_clean.py | Implements GTFS cleaning/filtering and produces a processing report. |
| r2gg/gtfs_pipeline/get_all_gtfs.py | Implements dataset selection, download, and extraction from transport.data.gouv.fr API. |
| r2gg/gtfs_pipeline/config.py | Defines PipelineConfig and DepartmentSplitConfig dataclasses. |
| r2gg/gtfs_pipeline/main.py | Adds CLI for running the pipeline standalone. |
| r2gg/gtfs_pipeline/init.py | Exposes the public API for the GTFS pipeline package. |
| r2gg/_main.py | Integrates GTFS preprocessing into Valhalla generation flow and adds required Valhalla args. |
| docs/usage/r2gg.md | Documents the gtfs config block and behavior under osm2valhalla(). |
| docker/config/bdtopo2valhalla.json | Adds example gtfs block; adds multimodal cost profile and date_time input id. |
| docker/config/bdtopo2valhalla_local.json | Same as above for local config. |
| docker/config/bdtopo2valhalla_idf.json | Adds date_time input id. |
| .github/workflows/unit-test.yml | Installs base requirements during unit test workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
VincentMiras
left a comment
There was a problem hiding this comment.
merge gtfs et gtfs departements ne sont théorquement plus utiles
|
@copilot Remove the code from gtfs_departements and gtfs_merge, and remove all possibility to call them including the parameters for the gtfs pipeline. |
Done. I've removed the gtfs_departements and merge_gtfs modules along with all related functionality, including:
All tests pass successfully. |
No description provided.