diff --git a/.github/workflows/test-overpass.yml b/.github/workflows/test-overpass.yml index c81580a43..934075e4f 100644 --- a/.github/workflows/test-overpass.yml +++ b/.github/workflows/test-overpass.yml @@ -21,8 +21,8 @@ jobs: # Runs TestOverpass.py to check for API functionality - name: Test Overpass env: - OVERPASS_KEY: '${{ secrets.OVERPASS_API }}' + GEOFABRIK_OVERPASS_KEY: '${{ secrets.OVERPASS_API }}' run: | echo Testing overpass! - chmod +x emission/individual_tests/setup_overpass_tests.sh - ./emission/individual_tests/setup_overpass_tests.sh + chmod +x emission/individual_tests/setup_and_test_overpass.sh + ./emission/individual_tests/setup_and_test_overpass.sh diff --git a/emission/individual_tests/TestOverpass.py b/emission/individual_tests/TestOverpass.py index 1e8d524c2..aedb64390 100644 --- a/emission/individual_tests/TestOverpass.py +++ b/emission/individual_tests/TestOverpass.py @@ -12,7 +12,7 @@ import logging #Set up query -OVERPASS_KEY = os.environ.get("OVERPASS_KEY") +GEOFABRIK_OVERPASS_KEY = os.environ.get("GEOFABRIK_OVERPASS_KEY") #Sample loc1 = NREL East Gate loc1 = {'coordinates': [-105.16844103184974, 39.740428870224605]} @@ -29,7 +29,7 @@ def setUp(self): sample_data = '[out:json][bbox];way[amenity=parking];out;&bbox=-122.1111238,37.4142118,-122.1055791,37.4187945' call_base = 'api/interpreter?data=' self.public_url_base = 'https://lz4.overpass-api.de/'+ call_base + sample_data - self.gfbk_url_base = 'https://overpass.geofabrik.de/' + OVERPASS_KEY + '/' + call_base + sample_data + self.gfbk_url_base = 'https://overpass.geofabrik.de/' + GEOFABRIK_OVERPASS_KEY + '/' + call_base + sample_data def test_overpass(self): r_gfbk = requests.get(self.gfbk_url_base) diff --git a/emission/net/ext_service/transit_matching/match_stops.py b/emission/net/ext_service/transit_matching/match_stops.py index 3ad38b018..afa5d6abd 100644 --- a/emission/net/ext_service/transit_matching/match_stops.py +++ b/emission/net/ext_service/transit_matching/match_stops.py @@ -7,8 +7,8 @@ import time try: - OVERPASS_KEY = os.environ.get("OVERPASS_KEY") - url = 'https://overpass.geofabrik.de/' + OVERPASS_KEY + '/' + GEOFABRIK_OVERPASS_KEY = os.environ.get("GEOFABRIK_OVERPASS_KEY") + url = 'https://overpass.geofabrik.de/' + GEOFABRIK_OVERPASS_KEY + '/' print("overpass configured") except: print("overpass not configured, falling back to public overpass api")