-
Notifications
You must be signed in to change notification settings - Fork 113
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
Add an option to run place-name-resolver without GCS access #410
Conversation
placeIdToDcid, err := loadPlaceIdToDcidMap(p2d) | ||
if err != nil { | ||
return err | ||
placeId2Dcid := &map[string]string{} |
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.
map is "pointer" like, can just do "map[string]string{}"
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.
So its okay fro loadPlaceIdToDcidMap() to return a map, rather than a map pointer? Wei had in the past suggested passing/returning pointers...
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.
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.
Thanks, changed all pointers to refs.
@@ -12,12 +12,22 @@ includes local-id references to contained-in places. | |||
|
|||
For sample input/output CSVs, see the `.csv` files in `place_name_resolver/testdata` directory. | |||
|
|||
NOTE: If the `--generate_place_id` is set, then in place of DCIDs, Maps placeIDs |
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 have too much context for this use, does it mean user could get the place id in batch (would that be a concern..)?
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.
This is no different than accessing the public Maps API which return place IDs, which is what the tools does, right? The user of the tool anyway needs to provide the Maps API Key.
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.
Then that's okay.
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.
Thanks for the review!
@@ -12,12 +12,22 @@ includes local-id references to contained-in places. | |||
|
|||
For sample input/output CSVs, see the `.csv` files in `place_name_resolver/testdata` directory. | |||
|
|||
NOTE: If the `--generate_place_id` is set, then in place of DCIDs, Maps placeIDs |
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.
This is no different than accessing the public Maps API which return place IDs, which is what the tools does, right? The user of the tool anyway needs to provide the Maps API Key.
placeIdToDcid, err := loadPlaceIdToDcidMap(p2d) | ||
if err != nil { | ||
return err | ||
placeId2Dcid := &map[string]string{} |
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.
So its okay fro loadPlaceIdToDcidMap() to return a map, rather than a map pointer? Wei had in the past suggested passing/returning pointers...
@@ -12,12 +12,22 @@ includes local-id references to contained-in places. | |||
|
|||
For sample input/output CSVs, see the `.csv` files in `place_name_resolver/testdata` directory. | |||
|
|||
NOTE: If the `--generate_place_id` is set, then in place of DCIDs, Maps placeIDs |
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.
Then that's okay.
placeIdToDcid, err := loadPlaceIdToDcidMap(p2d) | ||
if err != nil { | ||
return err | ||
placeId2Dcid := &map[string]string{} |
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.
Add a --generate_place_id option to produce placeID results instead of DCID.