whosonfirst / py-mapzen-whosonfirst-export

Export tools for the Who's On First documents
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Update wof:repo logic #21

Open stepps00 opened 5 years ago

stepps00 commented 5 years ago

This change updates the way the wof:repo property is updated.

Right now, wof:repo is only written if the property does not exist. If the wof:repo property exists, the property value is not updated.

This change compares the wof:repo property value with the current repo root, which is needed when moving records between per-country repositories (like what is needed to fix this issue).

This may be a specific use case, but could be useful nonetheless.

nvkelso commented 5 years ago

Would need similar change in Go version, too?

thisisaaronland commented 5 years ago

This seems fine on the face of it but give me an hour or two to think about it.

The convention is that we are always exporting files to whosonfirst-data-FOO/data but that may not always be true at which point we would be invalidating otherwise correct wof:repo.

Probably better to add a "assume wof/data folder" (boolean) flag to export/__init__.py and a corresponding CLI flag in scripts/wof-exportify that default to True. Make sense?

Also, please make sure to bump the VERSION number.

stepps00 commented 5 years ago

@thisisaaronland yeah, that makes sense. I'll revisit this soon, add an updated VERSION number, and take a look at CLI/boolean flags.