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

add CHECK_NAME_DUPLICATES feature #33

Merged

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Adds a new feature CHECK_NAME_DUPLICATES in the config which disables name-based duplicate checking. This is helpful when your GTFS has common names in it.

Copy link

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

LGTM, please clean up the comments.

handler.ts Outdated Show resolved Hide resolved
handler.ts Outdated
{ customResponse: cur, primaryResponse: prev },
// Default to false
CHECK_NAME_DUPLICATES !== 'false'
// convertQSPToGeocoderArgs(event.queryStringParameters)?.focusPoint

Choose a reason for hiding this comment

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

Remove commented code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch thanks

Copy link
Collaborator

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

How hard would it be to add a test for this functionality?

@@ -112,13 +112,15 @@ describe('response merging', () => {
customResponse: CUSTOM_RESPONSE,
primaryResponse: GEOCODE_EARTH_RESPONSE
},
true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we get a test that tests this with false?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried but couldn't do it in any way that made sense. This test tests for something completely different. We could add an entire new test case but this is a really weird edge case so I'm tempted to add a TODO here instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd be fine with a TODO.

Copy link
Collaborator

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

LGTM! You can add the todo if you want but I think it probably doesn't matter. We'll probably never get to it anyway.

@miles-grant-ibigroup miles-grant-ibigroup merged commit ffb27ab into master Sep 18, 2024
1 check passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the support-disabling-name-based-dupe-checking branch September 18, 2024 14:22
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.

3 participants