Closed tiwilliam closed 11 years ago
Do you support both Netspeed and NetspeedCell? They are unfortunately separate formats. The latter is the newer format and is more similar to the Org/ISP databases.
I noticed that some of your test databases are quite old (and large). There are some small unit test databases in the Java repo that you are free to use:
https://github.com/maxmind/geoip-api-java/tree/master/src/test/resources/GeoIP
If anything is missing from them, please let me know. The GeoIP-178 CSV corresponds to the NetspeedCell binary.
This implementation was just for the first revision of Netspeed. I got really strange negative offsets when trying my Netspeed revision 1 database. I will try again with the Java databases, I got most of my databases from support@maxmind.com +1 year ago, a refresh would be nice. Thanks for your feedback!
I haven't looked at the pygeoip code closely, but due to the format differences, you will likely need to use name_by_addr for the rev1 Netspeed databases instead of id_by_addr. This might be what is causing the offset errors.
Thanks for all of your work on the module!
@tiwilliam, Would you be ok in licensing your unit tests under the LGPL 2.1 for use in the GeoIP extension? I ported them over to the extension before realizing that pygeoip is under the LGPL 3, not 2.1. From what I can tell, you are the sole author of the unit tests, but I could be mistaken. If not, I can rewrite them from scratch.
Never mind, I see the tests were based off an earlier test file that was present when the repo was created. I'll just rewrite them.
I guess me and @jennifere together own them, I can agree to change the license but we need @jennifere's voice on this.
I ended up rewriting the tests from scratch rather than using the pygeoip one. Thanks though!