Regular readers will recall our ongoing efforts to provide a correctly formatted string for each API response. Here’s the detailed background and our update from a few months ago. In short, it turns out humans have devised a baffling number of ways to format place names, and our opensource address formatting project is an attempt to create a set of templates that can be used to correctly display addresses all around the world.
I’m very pleased to announce that this week we hit 100% test coverage on the project. Each of the 249 “countries” in the world (as defined by ISO 3166-1 alpha-2 codes) now has at least one test.
While there are several libraries available that attempt to perform this task in one programming language or another, the goal of our project was to separate the templates from the language used to render the output. The idea being that developers of all languages can contribute to the tests and configuration. Happily this seems to be working. We use and maintain a perl library that uses the templates, and recently a PHP implementation appeared. The impressive looking libpostal library also uses the templates as an input. Hopefully more implementations will appear, several people have expressed interest in a javascript version.
Getting at least one test for each territory (many of the “countries” are not actually countries) is a great step forward, but of course many more tests would be beneficial. Likewise we have some ideas to extend the library, which I hope to take forward as time allows.
For someone interested in geographic trivia it’s been fun getting the project to this point. Many thanks to everyone who has contributed. Please join us to help take it forward.
Enjoy the weekend,