From 51bf6c2a43a0bd19bae4aec433840fb37bec5670 Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 29 Jan 2018 18:39:11 +0100 Subject: [PATCH 1/2] Fixed valid Mapbox types --- NEWS.md | 2 ++ .../python/cartodb_services/cartodb_services/mapbox/types.py | 1 + server/lib/python/cartodb_services/setup.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index a1a3e9e..5b4cc73 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ January 29th, 2018 ================== * Version `0.30.1` of server side * Fix for Mapbox geocoding function due to the iso3166 library doesn't support UTF-8 names for the countries +* Version `0.16.2` of the python library + * Fix for Mapbox cycling profile January 18th, 2018 ================== diff --git a/server/lib/python/cartodb_services/cartodb_services/mapbox/types.py b/server/lib/python/cartodb_services/cartodb_services/mapbox/types.py index e2f9e8b..cc55bac 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapbox/types.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapbox/types.py @@ -5,4 +5,5 @@ MAPBOX_ISOLINES_APIKEY_ROUNDROBIN = 'mapbox_isolines_apikey_roundrobin' TRANSPORT_MODE_TO_MAPBOX = { 'car': 'driving', 'walk': 'walking', + 'bicycle': 'cycling', } diff --git a/server/lib/python/cartodb_services/setup.py b/server/lib/python/cartodb_services/setup.py index 38e1e78..b5658e6 100644 --- a/server/lib/python/cartodb_services/setup.py +++ b/server/lib/python/cartodb_services/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages setup( name='cartodb_services', - version='0.16.1', + version='0.16.2', description='CartoDB Services API Python Library', From e0b1632fa8d5941db5e076695a872a2406791528 Mon Sep 17 00:00:00 2001 From: Antonio Date: Tue, 30 Jan 2018 09:13:43 +0100 Subject: [PATCH 2/2] Fixed tests --- .../lib/python/cartodb_services/test/test_mapboxgeocoder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/lib/python/cartodb_services/test/test_mapboxgeocoder.py b/server/lib/python/cartodb_services/test/test_mapboxgeocoder.py index 9c5d8f0..37bbc05 100644 --- a/server/lib/python/cartodb_services/test/test_mapboxgeocoder.py +++ b/server/lib/python/cartodb_services/test/test_mapboxgeocoder.py @@ -22,8 +22,8 @@ class MapboxGeocoderTestCase(unittest.TestCase): def test_valid_request(self): place = self.geocoder.geocode(VALID_ADDRESS) - self.assertEqual(place[0], WELL_KNOWN_LONGITUDE) - self.assertEqual(place[1], WELL_KNOWN_LATITUDE) + self.assertEqual('%.3f' % place[0], '%.3f' % WELL_KNOWN_LONGITUDE) + self.assertEqual('%.3f' % place[1], '%.3f' % WELL_KNOWN_LATITUDE) def test_valid_request_namedplace(self): place = self.geocoder.geocode(searchtext='Barcelona')