OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
186 stars 88 forks source link

Upgrade Omgeo to v5.1.0 #3249

Closed hectcastro closed 6 years ago

hectcastro commented 6 years ago

Replaces use of urllib and urllib2 with Requests library while attempting to maintain backwards compatibility.

Fixes https://github.com/azavea/operations/issues/200


Testing

Provision the app virtual machine with this branch, then ensure that v5.1.0 of Omgeo was installed:

vagrant@app:~$ pip freeze 2> /dev/null | grep omgeo
python-omgeo==5.1.0

In addition, interact with the /geocode endpoint to ensure that it continues to function.

$ http "http://localhost:6060/geocode?address=990%20Spring%20Garden%20St%2C%20Philadelphia%2C%20PA%2C%2019123%2C%20USA&key=dHA9MCNsb2M9MTY2NTMzMSNsbmc9MzMjZmE9NTA0NjI3MiNobj05OTA%3D"
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en
Content-Type: application/json
Date: Wed, 20 Jun 2018 17:34:28 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
Vary: Accept-Language, Cookie

{
    "lat": 39.96114299999999,
    "lng": -75.15422099999999
}
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 83.868% when pulling fa6ef01eb5878046dd05ffbeae1be845e8e8417b on feature/hmc/omgeo-with-requests into 585988634115fd5da48a78c6af579af5364d7561 on develop.