feat: batch task to reduce geojson maps precision and remove ids#1353
Merged
Conversation
davidgamez
commented
Sep 9, 2025
davidgamez
marked this pull request as ready for review
September 10, 2025 19:00
cka-y
approved these changes
Sep 10, 2025
cka-y
left a comment
Contributor
There was a problem hiding this comment.
LGTM ! left some minor comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Closes MobilityData/product-tasks#152
This pull request introduces a new task for updating the precision of GeoJSON files in Google Cloud Storage and removing OSM-related identifiers from their properties. It also adds the necessary database columns to track the processing of these files and provides comprehensive unit tests for the new functionality. Additionally, there are minor dependency and import improvements to support these changes.
GeoJSON File Processing Task
update_geojson_files_precision_handlerintasks/geojson/update_geojson_files_precision.pyto round coordinates in GeoJSON files and remove OSM-related keys from feature properties, with support for dry-run mode and configurable precision.main.pyand documented its usage, enabling invocation via the task executor. [1] [2]Database Schema Updates
geolocation_file_created_dateandgeolocation_file_dataset_idcolumns to thefeedtable, with a foreign key constraint togtfsdataset(id), to track processed GeoJSON files. [1] [2]Testing and Development Environment
sharedimports resolve correctly by updatingsys.pathinconftest.py.Dependency Management
psutiltorequirements.txtto support resource tracking for the new handler.Code Quality and Maintainability
pycountryinhelpers/locations.pyto be local within the function, reducing unnecessary global imports. [1] [2]Expected behavior:
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
GTFS Feed Map

GBFS Feed Map

Testing tips:
Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.shto make sure you didn't break anything