From a32e90ea8ad93ea7c0fd3b761c985668f5571be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Thu, 2 Aug 2018 12:59:45 +0200 Subject: [PATCH 1/4] carto-package.json proposal --- client/carto-package.json | 17 +++++++++++ server/extension/carto-package.json | 30 +++++++++++++++++++ .../cartodb_services/carto-package.json | 11 +++++++ 3 files changed, 58 insertions(+) create mode 100644 client/carto-package.json create mode 100644 server/extension/carto-package.json create mode 100644 server/lib/python/cartodb_services/carto-package.json diff --git a/client/carto-package.json b/client/carto-package.json new file mode 100644 index 0000000..8e9608d --- /dev/null +++ b/client/carto-package.json @@ -0,0 +1,17 @@ +{ + "name": "dataservices-api-client-extension", + "versions": { + "0.25.0": { + "tag": "0.25.0-client", + "works_with": { + "dataservices-api-server-extension": "^0.32.0" + }, + "requires": { + "postgresql": "^10.0.0", + "postgis": "^2.4", + "cartodb-postgresql": "^0.23.0" + } + } + } +} + diff --git a/server/extension/carto-package.json b/server/extension/carto-package.json new file mode 100644 index 0000000..fd0d32a --- /dev/null +++ b/server/extension/carto-package.json @@ -0,0 +1,30 @@ +{ + "name": "dataservices-api-server-extension", + "versions": { + "0.32.0": { + "tag": "0.32.0-server", + "works_with": { + "dataservices-api-server-python-lib": "^0.19.0" + }, + "requires": { + "postgresql": "^10.0.0", + "postgis": "^2.4", + "cartodb-postgresql": "^0.23.0" + } + }, + "0.32.0-customer": { + "tag": "0.32.0-server-customer", + "works_with": { + "dataservices-api-server-python-lib": { + "git-repository": "https://github.com/CUSTOMER/dataservices-api", + "manifest": "/server/extension/carto-package.json", + "version": "0.19.0-experimental" + } + }, + "requires": { + "postgresql": "^10.0.0", + "postgis": "^2.4", + "cartodb-postgresql": "^0.23.0" + } + } +} diff --git a/server/lib/python/cartodb_services/carto-package.json b/server/lib/python/cartodb_services/carto-package.json new file mode 100644 index 0000000..9b9e655 --- /dev/null +++ b/server/lib/python/cartodb_services/carto-package.json @@ -0,0 +1,11 @@ +{ + "name": "dataservices-api-server-python-lib", + "versions": { + "0.19.0": { + "tag": "python-0.19.0", + "requires": { + "python": "2.7" + } + } + } +} From c1c671755c48e7a5823d8e6ee47a4c6cc4ac5d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Mon, 13 Aug 2018 16:20:59 +0200 Subject: [PATCH 2/4] Final carto-package.json format --- client/carto-package.json | 20 +++++------- server/extension/carto-package.json | 32 +++++-------------- .../cartodb_services/carto-package.json | 9 ++---- 3 files changed, 19 insertions(+), 42 deletions(-) diff --git a/client/carto-package.json b/client/carto-package.json index 8e9608d..1ec7a40 100644 --- a/client/carto-package.json +++ b/client/carto-package.json @@ -1,17 +1,13 @@ { "name": "dataservices-api-client-extension", - "versions": { - "0.25.0": { - "tag": "0.25.0-client", - "works_with": { - "dataservices-api-server-extension": "^0.32.0" - }, - "requires": { - "postgresql": "^10.0.0", - "postgis": "^2.4", - "cartodb-postgresql": "^0.23.0" - } + "current_version": { + "requires": { + "postgresql": "^10.0.0", + "postgis": "^2.4", + "cartodb-extension": "^0.23.0" + }, + "works_with": { + "dataservices-api-server-extension": "^0.32.0" } } } - diff --git a/server/extension/carto-package.json b/server/extension/carto-package.json index fd0d32a..29514f7 100644 --- a/server/extension/carto-package.json +++ b/server/extension/carto-package.json @@ -1,30 +1,14 @@ { "name": "dataservices-api-server-extension", - "versions": { - "0.32.0": { - "tag": "0.32.0-server", - "works_with": { - "dataservices-api-server-python-lib": "^0.19.0" - }, - "requires": { - "postgresql": "^10.0.0", - "postgis": "^2.4", - "cartodb-postgresql": "^0.23.0" - } + "current_version": { + "requires": { + "postgresql": "^10.0.0", + "postgis": "^2.4", + "cartodb-postgresql": "^0.23.0" }, - "0.32.0-customer": { - "tag": "0.32.0-server-customer", - "works_with": { - "dataservices-api-server-python-lib": { - "git-repository": "https://github.com/CUSTOMER/dataservices-api", - "manifest": "/server/extension/carto-package.json", - "version": "0.19.0-experimental" - } - }, - "requires": { - "postgresql": "^10.0.0", - "postgis": "^2.4", - "cartodb-postgresql": "^0.23.0" + "works_with": { + "dataservices-api-server-python-lib": "^0.19.1", + "observatory-server-extension": "^1.9.0" } } } diff --git a/server/lib/python/cartodb_services/carto-package.json b/server/lib/python/cartodb_services/carto-package.json index 9b9e655..47a1277 100644 --- a/server/lib/python/cartodb_services/carto-package.json +++ b/server/lib/python/cartodb_services/carto-package.json @@ -1,11 +1,8 @@ { "name": "dataservices-api-server-python-lib", - "versions": { - "0.19.0": { - "tag": "python-0.19.0", - "requires": { - "python": "2.7" - } + "current_version": { + "requires": { + "python": "2.7" } } } From ed2e87f4ca2fac07879172eef2be08bfdd6e58e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Tue, 14 Aug 2018 09:27:59 +0200 Subject: [PATCH 3/4] Fix test fixture --- .../test/test_mapboxrouting.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/server/lib/python/cartodb_services/test/test_mapboxrouting.py b/server/lib/python/cartodb_services/test/test_mapboxrouting.py index 2101535..160b2a5 100644 --- a/server/lib/python/cartodb_services/test/test_mapboxrouting.py +++ b/server/lib/python/cartodb_services/test/test_mapboxrouting.py @@ -17,16 +17,17 @@ VALID_PROFILE = DEFAULT_PROFILE INVALID_PROFILE = 'invalid_profile' WELL_KNOWN_SHAPE = [(40.73312, -73.98891), (40.73353, -73.98987), - (40.73398, -73.99095), (40.73321, -73.99111), - (40.73245, -73.99129), (40.7333, -73.99332), - (40.7338, -73.99449), (40.73403, -73.99505), - (40.73344, -73.99549), (40.73286, -73.9959), - (40.73226, -73.99635), (40.73186, -73.99664), - (40.73147, -73.99693), (40.73141, -73.99698), - (40.73147, -73.99707), (40.73219, -73.99856), - (40.73222, -73.99861), (40.73225, -73.99868), - (40.73293, -74.00007), (40.733, -74.00001)] -WELL_KNOWN_LENGTH = 1384.8 + (40.73398, -73.99095), (40.73453, -73.99227), + (40.73531, -73.99412), (40.73467, -73.99459), + (40.73442, -73.99477), (40.73435, -73.99482), + (40.73403, -73.99505), (40.73344, -73.99549), + (40.73286, -73.9959), (40.73226, -73.99635), + (40.73186, -73.99664), (40.73147, -73.99693), + (40.73141, -73.99698), (40.73147, -73.99707), + (40.73219, -73.99856), (40.73222, -73.99861), + (40.73225, -73.99868), (40.73293, -74.00007), + (40.733, -74.00001)] +WELL_KNOWN_LENGTH = 1317.9 class MapboxRoutingTestCase(unittest.TestCase): From d9f647504a014b5b320eaa9a6d52afa852cb1cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Ignacio=20S=C3=A1nchez=20Lara?= Date: Tue, 14 Aug 2018 09:39:42 +0200 Subject: [PATCH 4/4] Disable Mapbox Matrix API usage at tests --- .../python/cartodb_services/test/metrics/test_config.py | 7 ++++--- .../lib/python/cartodb_services/test/test_mapboxisoline.py | 4 +--- .../lib/python/cartodb_services/test/test_mapboxmatrix.py | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/lib/python/cartodb_services/test/metrics/test_config.py b/server/lib/python/cartodb_services/test/metrics/test_config.py index 9ab9f34..4a14a8a 100644 --- a/server/lib/python/cartodb_services/test/metrics/test_config.py +++ b/server/lib/python/cartodb_services/test/metrics/test_config.py @@ -173,7 +173,8 @@ class TestGeocoderOrgConfig(TestCase): class TestIsolinesUserConfig(TestCase): - ISOLINES_PROVIDERS = ['heremaps', 'mapzen', 'mapbox', 'tomtom'] + # Don't test mapbox. See CartoDB/cartodb-management/issues/5199" + ISOLINES_PROVIDERS = ['heremaps', 'mapzen', 'tomtom'] def setUp(self): self.redis_conn = MockRedis() @@ -233,8 +234,8 @@ class TestIsolinesUserConfig(TestCase): class TestIsolinesOrgConfig(TestCase): - - ISOLINES_PROVIDERS = ['heremaps', 'mapzen', 'mapbox', 'tomtom'] + # Don't test mapbox. See CartoDB/cartodb-management/issues/5199" + ISOLINES_PROVIDERS = ['heremaps', 'mapzen', 'tomtom'] def setUp(self): self.redis_conn = MockRedis() diff --git a/server/lib/python/cartodb_services/test/test_mapboxisoline.py b/server/lib/python/cartodb_services/test/test_mapboxisoline.py index ce80d0e..091ac7c 100644 --- a/server/lib/python/cartodb_services/test/test_mapboxisoline.py +++ b/server/lib/python/cartodb_services/test/test_mapboxisoline.py @@ -3,15 +3,13 @@ from mock import Mock from cartodb_services.mapbox.isolines import MapboxIsolines from cartodb_services.mapbox.matrix_client import DEFAULT_PROFILE from cartodb_services.mapbox.matrix_client import MapboxMatrixClient -from cartodb_services.mapbox.routing import MapboxRouting from cartodb_services.tools import Coordinate -from cartodb_services.tools.coordinates import (validate_coordinates, - marshall_coordinates) from credentials import mapbox_api_key VALID_ORIGIN = Coordinate(-73.989, 40.733) +@unittest.skip("Stop using Matrix API. CartoDB/cartodb-management/issues/5199") class MapboxIsolinesTestCase(unittest.TestCase): def setUp(self): diff --git a/server/lib/python/cartodb_services/test/test_mapboxmatrix.py b/server/lib/python/cartodb_services/test/test_mapboxmatrix.py index 579810a..b1ce42e 100644 --- a/server/lib/python/cartodb_services/test/test_mapboxmatrix.py +++ b/server/lib/python/cartodb_services/test/test_mapboxmatrix.py @@ -20,6 +20,7 @@ VALID_PROFILE = DEFAULT_PROFILE INVALID_PROFILE = 'invalid_profile' +@unittest.skip("Stop using Matrix API. CartoDB/cartodb-management/issues/5199") class MapboxMatrixTestCase(unittest.TestCase): def setUp(self): self.matrix_client = MapboxMatrixClient(token=mapbox_api_key(),