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

strip URLs from name/address #160

Merged
merged 1 commit into from
Dec 13, 2024
Merged

strip URLs from name/address #160

merged 1 commit into from
Dec 13, 2024

Conversation

missinglink
Copy link
Member

@missinglink missinglink commented Dec 11, 2024

as suggested in pelias/polylines#280 (comment) this PR strips URLs from name/address strings within the Model module itself.

Discuss!

related #115

@missinglink
Copy link
Member Author

missinglink commented Dec 11, 2024

Originally I thought it would be better to have this functionality in the importers but doing it in each has become arduous.

There have been a lot of people opening issues regarding all these warnings during import, which I'd like to avoid.

Any documents which contained a URL were being dropped, this would allow them to be saved.

It's hard to strip URLs (cleanly), in the test cases you'll see that if there is no whitespace after the URL then the extra chars are considered part of the URL.

It's also hard to avoid double-spaces, although I don't think this is an issue.

@orangejulius
Copy link
Member

Yeah I think this is a good, practical change.

I'm still not 100% sure on where we put logic that should be common across all importers. Model is a bit unwieldy for many things, but it's the best we have for now.

@missinglink missinglink merged commit 1cfe496 into master Dec 13, 2024
5 checks passed
@missinglink missinglink deleted the strip_urls branch December 13, 2024 14:11
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