postal-address icon indicating copy to clipboard operation
postal-address copied to clipboard

Use a DAG for territory aliases

Open kdeldycke opened this issue 10 years ago • 1 comments

Territory code aliases implementation is quite a mess, and to make it easier to maintain, use a directed acyclic graph to store the subdivision / country relationship as well as aliases.

With such a structure, we can easily solve #5 and check for stupid cycles in unit tests.

I think I'll leverage the NetworkX package to do so.

kdeldycke avatar Jan 26 '15 12:01 kdeldycke

This might help solve once for all unsupported edge-cases. See: https://github.com/online-labs/postal-address/commit/5b589f8b1f9ec4cc2aa3a18e82bbc4a994b538d3 and https://github.com/online-labs/postal-address/commit/fe73027343dacbd33a7309e951473a79b105c119 .

kdeldycke avatar Jan 28 '15 17:01 kdeldycke