Repository navigation
Conversation
|
|
This branch has not been deployed
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.
Problem
The bounding box of the BIXI Montréal GBFS system spans from Montreal to Null Island. Its
station_informationfeed contains three stations (304, 724, 747) with location (0, 0).reverse_geolocation_processbuilds the dataset bounding box from the min/max of all station coordinates, so these placeholder points stretch the box to (0, 0).Change
In
functions-python/reverse_geolocation/src/reverse_geolocation_processor.py, the stop filter that already drops missing coordinates now also drops rows where bothstop_latandstop_lonare 0. Those points are excluded from the bounding box and from reverse geolocation. Obvious outliers other than (0, 0) are not handled here.Testing
Added
test_valid_request_excludes_zero_zero_coordinatesinfunctions-python/reverse_geolocation/tests/test_reverse_geolocation_processor.py. It passes a stop DataFrame with two (0, 0) rows and two valid rows and asserts thatupdate_dataset_bounding_boxreceives only the two valid rows.The test was not run in the authoring environment: its Python dependencies (pandas, etc.) are not installed there, so CI is the verification. The Windows Python check
python -c "import pandas, shapely, geoalchemy2, flask, sqlalchemy; print('ok')"exited withModuleNotFoundError: No module named 'pandas'.Regression test: untested: CONTRIBUTING does not mention tests
Fixes #1887