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 alt property validation #2

Open
stepps00 opened this issue Sep 4, 2020 · 5 comments
Open

Add alt property validation #2

stepps00 opened this issue Sep 4, 2020 · 5 comments

Comments

@stepps00
Copy link
Member

stepps00 commented Sep 4, 2020

WOF requires five properties in alt files, but as far as I know, there are no tools to ensure these five properties are present. Properties include:

  • src:alt_label
  • src:geom
  • wof:geomhash
  • wof:id
  • wof:repo

Opening this issue to track a validation method to check for all of these required properties, assuming there isn't one already.

@missinglink
Copy link

Is this library currently in-use?

I was looking over the exportify code, which all seems to be Python and couldn't find any reference to this Go repo 🤷‍♂️

@stepps00
Copy link
Member Author

stepps00 commented Sep 7, 2020

This repo is still useful in finding out the root cause of a failed dist build, for example.. from the README:

Going forward it would be nice to imagine this as both a general-purpose validation tool and a core piece of a Go "export" package for Who's On First documents. At present exporting WOF documents is handled exclusively by the py-mapzen-whosonfirst-export and py-mapzen-whosonfirst-geojson libraries and it would be nice to have something in another language (and one that can generate pre-compiled binaries).

@thisisaaronland
Copy link
Member

@missinglink The goal is to replace the core/common tooling that was initially written in Python with Go versions.

The goal is ensure that these tools can a) be free of the kinds of dependency challenges that Python can introduce b) even if distributed as platform-specific binary tools.

It's slow progress, for all the usual reasons, but we'll get there eventually.

@missinglink
Copy link

Gotcha, the reason I asked is I wasn't sure if we should be making changes like this in the python code, the Go code or both.

@thisisaaronland
Copy link
Member

As a practical matter, the first place they should be made is in the Python code since that's "stable" and what @stepps00 uses for most of his work.

The gotcha there is that the py-mz-wof libraries are being updated to Python 3 on an as-needed basis so there is sometimes the extra work of updating code. The good news is that py-3 updates have so far mostly consisted of ensuring print statements and exceptions have parentheses and converting except Exception, e to except Exception as e.

Best practice should be to ensure that both the Python and Go code get updated at the same, unless dealing with the Go version involves major rewrites or refactoring; things like "Oh look, now I need to port edtf.py to Go..."

Ideally, I'd like for WOF to have "core" tools in both Python and Go. Python is more of a common currency than Go and is more amenable to the kinds of utility scripts and tools that Stephen needs to do his job. Go is better for making tools that we can point people to when they just want to make a quick edit or contribution (and need to "exportify" their changes).

It also demonstrates that if it's possible to maintain common tools in those languages, they can be the templates for [ all the other languages ].

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

No branches or pull requests

3 participants