baturin / wikivoyage-listings

Data extracted from Wikivoyage, the free travel guide at http://wikivoyage.org. Leverage Wikivoyage listings on your smartphone, or in your own mashups.
http://wvpoi.batalex.ru/
Other
48 stars 27 forks source link

Rewrite validators to enable omitting of invalid data in output #51

Closed zstojanovic closed 6 years ago

zstojanovic commented 6 years ago

This PR is a proposal of a mini re-write of validators in order to enable omitting of invalid data in output. Its purpose is to close #49

Here are some highlights:

Once an Iterable of Listing passes through all the Validators, the Listings become enriched with ValidationIssues. Each output format can then choose what to do with that data - either use the unvalidated (raw) data, or the validated data which is null in case of a validation issue.