iandees / wof-editor

A simple Who's on First editor.
https://writefield.nextzen.org/
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Updating the wof:name of Delhi caused multiple properties to be edited #39

Closed stepps00 closed 4 years ago

stepps00 commented 4 years ago

https://github.com/whosonfirst-data/whosonfirst-data-admin-in/pull/31/files

The only edit I made was to change the wof:name to "Delhi1", but as you can see, many properties were updated.

nvkelso commented 4 years ago

Oops, that's not good! Let's dig into this before general release of v1.

iandees commented 4 years ago

It looks like the data.whosonfirst.org version is really old. It's this one, which is from July.

nvkelso commented 4 years ago

Looks like we can crutch off WOF.org for which repo, but we should always read from repo.

And when new feature ask for which repo or full url?

On Feb 6, 2020, at 17:45, Ian Dees notifications@github.com wrote:

 It looks like the data.whosonfirst.org version is really old. It's this one, which is from July.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

stepps00 commented 4 years ago

Ahh.. the data.whosonfirst.org site can be out of sync, the Github page will have the most up-to-date version of each record.

iandees commented 4 years ago

Ok, I am making a request to data.whosonfirst.org to get the wof:repo property and then making a request to GitHub to get the actual data from the repo's master branch to display for editing.

I also added an endpoint to do this same thing so others can use it if they want: https://93ctehyu4h.execute-api.us-east-1.amazonaws.com/dev/place/85977539/metadata

I made a PR for Delhi after these changes (https://github.com/whosonfirst-data/whosonfirst-data-admin-in/pull/33) and it looks better.

stepps00 commented 4 years ago

I made a second PR for Delhi, which looks much cleaner: https://github.com/whosonfirst-data/whosonfirst-data-admin-in/pull/34/files

Note that the name:eng_x_colloquial property currently exists as an empty string (it should be removed), and because it is empty, the wof-editor strips the record of this property. Probably not a blocker because the property doesn't need to be present, but something that caught my eye.

nvkelso commented 4 years ago

Agree that empty property should be stripped out.

@iandees what happens when data.whosonfirst.org doesn't have that file? Does it error hard or prompt for a URL &/or repo?

iandees commented 4 years ago

For an example: https://93ctehyu4h.execute-api.us-east-1.amazonaws.com/dev/place/512891029831/edit

Gives:

image

iandees commented 4 years ago

Hit send too soon, but the idea is that on that initial page would be a box to enter the URL or the GitHub repo + ID.