-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add AREA_CODE high performance geocoding #208
Conversation
To enable this, the geocoding config must have only one element, with the "type" set to "area_code".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for adding tests for this.
hub/graphql/dataloaders.py
Outdated
filters: dict = {} | ||
select_related: list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these need to be = dict() and = list() for immutability's sake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think changing them to dict()
and list()
would fix the immutability issue, but I think simply removing the default values works – the factory sets them to fresh {}
and []
on class creation.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Part of the work required for the data pipeline V2: https://linear.app/commonknowledge/issue/MAP-973/planning-for-data-import-pipeline-v2
This adds a new Geocoder:
AREA_CODE_GEOCODER_V2
. To enable it, the geocoding config must have only one element, with the"type"
set to"area_code"
.This Geocoder uses dataloaders to ensure maximum parallelisation.
To Test
Add an AreaData source, where each row is identified to an area by code. Set up the geocoding_config to look something like: