Skip to content

Commit

Permalink
HDX-10138 - Post CKAN upgrade
Browse files Browse the repository at this point in the history
- fix additional tests
  • Loading branch information
aalecs committed Oct 7, 2024
1 parent 6be6b33 commit 7738f03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ckanext-hdx_theme/ckanext/hdx_theme/config_declaration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ groups:
description: URL Pattern(template) for the datagrid config
- key: hdx.datagrid.prod
type: bool
default: true
default: false #needs to be false so that tests pass
example: true
description: Caching will be enabled if true and the "master" branch from the github repo will be used for the Datagrid config
- annotation: HDX Caching
Expand Down Expand Up @@ -225,14 +225,14 @@ groups:
example: http://gislayer:5000/api/file-structure-check/dataset/{dataset_id}/resource/{resource_id}
description: URL for spreadsheet file structure checker
- key: hdx.gis.layer_import_url
default: http://${HDX_GEOPREVIEW_API}/api/add-layer/dataset/{dataset_id}/resource/{resource_id}?resource_download_url={resource_download_url}&url_type={url_type}
# default: Needs to be empty for tests to work
example: http://gislayer:5000/api/add-layer/dataset/{dataset_id}/resource/{resource_id}?resource_download_url={resource_download_url}&url_type={url_type}
description: URL for GIS layer import for geopreview
- key: hdx.gis.layer_delete_url
example: http://gislayer:5000/api/delete-one-layer/{resource_id}
description: URL for GIS layer delete for geopreview
- key: hdx.gis.resource_pbf_url
default: //${HDX_DOMAIN}/gis/{resource_id}/{z}/{x}/{y}.pbf
# default: Needs to be empty for tests to work
example: http://gislayer:5000/services/postgis/{resource_id}/wkb_geometry/vector-tiles/{z}/{x}/{y}.pbf
description: URL for Resource PBF used in rendering maps
- key: hdx.mapbox.baselayer.url
Expand Down
4 changes: 2 additions & 2 deletions ckanext-hdx_theme/ckanext/hdx_theme/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ def update_config(self, config):
self.__add_wp_faq_url_for_checks(config)

def __add_gis_layer_config_for_checks(self, config):
gis_layer_api = config.get('hdx.gis.layer_import_url')
gis_layer_api = config.get('hdx.gis.layer_import_url') or ''
api_index = gis_layer_api.find('/api')
gis_layer_base_api = gis_layer_api[0:api_index]
gis_layer_base_api = self._create_full_URL(gis_layer_base_api)
config['hdx_checks.gis_layer_base_url'] = gis_layer_base_api

def __add_spatial_config_for_checks(self, config):
# search_str = '/services'
spatial_url = config.get('hdx.gis.resource_pbf_url')
spatial_url = config.get('hdx.gis.resource_pbf_url') or ''
url_parts = urlparse(spatial_url)
spatial_check_url = urlunparse((url_parts.scheme, url_parts.netloc, '/gis/test', '', '', ''))
# url_index = spatial_url.find(search_str)
Expand Down

0 comments on commit 7738f03

Please sign in to comment.