Skip to content
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

remove full_token_address_suffix_expansion #359

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

missinglink
Copy link
Member

We currently have a synonyms file called full_token_address_suffix_expansion which I believe we can remove in favour of using the combination of two existing synonyms files (street_suffix & directionals).

I can't remember the history here but the full_token_address_suffix_expansion synonyms are presumably intended for use when the full_token is available (ie. not for partially complete tokens)

Despite this, the full_token_address_suffix_expansion functionality seems to avoid 'unsafe' expansions which would only be relevant for partially complete tokens.

The synonyms also follow the legacy synonyms format where tokens were 'expanded' from their contracted form to their expanded form (ie. a 'replacement'), the more recent approach we've adopted is to use the , convention in mappings rather than the => convention which allows for either the contracted or expanded form to match.

This feels good to me but I'm a little uneasy about it simply because I don't remember why it was the way it was, I think it's just because the code is old and it's better off being removed and replaced.

@missinglink
Copy link
Member Author

This PR is ready for testing and merging. Originally I coupled this with another PR but I now think it's best to merge on its own.
GTG

@orangejulius orangejulius force-pushed the remove_full_token_address_suffix_expansion branch from 3dee3e6 to 0e14823 Compare June 3, 2019 16:34
Copy link
Member

@orangejulius orangejulius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall exactly why we did it this way either, and the history isn't much help, but I agree the way this code works doesn't look ideal.

Replacing via synonyms is not ideal, and I like how this clarifies the different purposes of our synonym files.

It's clear even just from the integration tests that this allows the replacements from other synonym files to result in more of the behavior we want.

@orangejulius orangejulius merged commit c408b38 into master Jun 3, 2019
@orangejulius orangejulius deleted the remove_full_token_address_suffix_expansion branch June 3, 2019 16:43
orangejulius added a commit to pelias/acceptance-tests that referenced this pull request Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants