From 4465aebfcdc39f8e8eaa564420dc4d0f9e91b97c Mon Sep 17 00:00:00 2001 From: nlebovits Date: Mon, 18 Nov 2024 08:52:39 -0500 Subject: [PATCH 1/2] remove references to mapbox key, which we are no longer using --- data/docker-compose.yml | 1 - data/src/config/config.py | 5 +---- data/src/script.py | 2 +- src/config/config.ts | 4 ---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/data/docker-compose.yml b/data/docker-compose.yml index 5d797d9e..ebf2a10a 100644 --- a/data/docker-compose.yml +++ b/data/docker-compose.yml @@ -6,7 +6,6 @@ services: image: vacant-lots-proj:latest environment: - GOOGLE_APPLICATION_CREDENTIALS=/app/service-account-key.json - - CFP_MAPBOX_TOKEN_UPLOADER - VACANT_LOTS_DB - CLEAN_GREEN_GOOGLE_KEY - PYTHONUNBUFFERED=1 diff --git a/data/src/config/config.py b/data/src/config/config.py index 16630a54..79bd315b 100644 --- a/data/src/config/config.py +++ b/data/src/config/config.py @@ -2,15 +2,12 @@ import os from pathlib import Path -FORCE_RELOAD = False +FORCE_RELOAD = True """ During the data load, whether to query the various GIS API services for the data to load into the postgres tables. If True, will query the API services, backup the database, reload the database and report on data differences. If false will read the data from postgres.""" USE_CRS = "EPSG:2272" """ the standard geospatial code for Pennsylvania South (ftUS) """ -MAPBOX_TOKEN = os.environ.get("CFP_MAPBOX_TOKEN_UPLOADER") -""" The location of the token for your mapbox account in your environment """ - log_level: int = logging.WARN """ overall log level for the project """ diff --git a/data/src/script.py b/data/src/script.py index 0b7bcc3e..cf42ace6 100644 --- a/data/src/script.py +++ b/data/src/script.py @@ -127,7 +127,7 @@ conn.commit() - # Post to Mapbox + # Post to GCP dataset.build_and_publish(tiles_file_id_prefix) # if we are reloading, run the diff report, then archive the backup and finally prune old archives diff --git a/src/config/config.ts b/src/config/config.ts index 6002630e..23cb2ad5 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -1,9 +1,5 @@ const EMPTY_STRING = ''; -export const mapboxAccessToken = - 'pk.eyJ1IjoibmxlYm92aXRzIiwiYSI6ImNsZXQ2Nzd3ZDBjZnYzcHFvYXhib2RqYzQifQ.PWg2LuNCH1E6-REjmYvdOg' || - EMPTY_STRING; - export const maptilerApiKey = process.env.NEXT_PUBLIC_MAPTILER_KEY || EMPTY_STRING; From 8485a30b24b1c8a75f87a56086c014ac30a62e5e Mon Sep 17 00:00:00 2001 From: nlebovits Date: Mon, 18 Nov 2024 08:53:56 -0500 Subject: [PATCH 2/2] set force reload to False by default --- data/src/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/src/config/config.py b/data/src/config/config.py index 79bd315b..7b7fa01c 100644 --- a/data/src/config/config.py +++ b/data/src/config/config.py @@ -2,7 +2,7 @@ import os from pathlib import Path -FORCE_RELOAD = True +FORCE_RELOAD = False """ During the data load, whether to query the various GIS API services for the data to load into the postgres tables. If True, will query the API services, backup the database, reload the database and report on data differences. If false will read the data from postgres.""" USE_CRS = "EPSG:2272"