From a5895cce481e3f8a1011c1fcc86d88ca3c60f469 Mon Sep 17 00:00:00 2001 From: Mattijs Ugen <144798+akaIDIOT@users.noreply.github.com> Date: Sat, 8 Jul 2023 17:21:16 +0200 Subject: [PATCH] Lift hansken_project to a local hansken_project --- 01 query_word_cloud.py | 5 ++++- 02 searches_time.py | 5 ++++- 03 hansken_facet_heatmap.py | 5 ++++- 04 types_in_piechart.py | 5 ++++- 05 unique_values_treemap_chatmessage.py | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/01 query_word_cloud.py b/01 query_word_cloud.py index 1d3a8ff..9849a08 100644 --- a/01 query_word_cloud.py +++ b/01 query_word_cloud.py @@ -9,9 +9,12 @@ from hansken.connect import connect_project # setup hansken connection in_browser = 'js' in sys.modules + hansken_host = '' +hansken_project = '5ee273fd-0978-4a0a-b8b0-2af2f8479214' + context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', + project=hansken_project, keystore=f'http://{hansken_host}:9090/keystore/', # Authentication is faked if we run in the browser, # because an authenticated session should already be present diff --git a/02 searches_time.py b/02 searches_time.py index 5d407e3..6119dcb 100644 --- a/02 searches_time.py +++ b/02 searches_time.py @@ -16,9 +16,12 @@ from hansken.query import RangeFacet # The line below finds out if we run in the browser by checking for the js module in_browser = 'js' in sys.modules + hansken_host = '' +hansken_project = '5ee273fd-0978-4a0a-b8b0-2af2f8479214' + context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', + project=hansken_project, keystore=f'http://{hansken_host}:9090/keystore/', # Authentication is faked if we run in the browser, # because an authenticated session should already be present diff --git a/03 hansken_facet_heatmap.py b/03 hansken_facet_heatmap.py index d1294d6..1bfd25f 100644 --- a/03 hansken_facet_heatmap.py +++ b/03 hansken_facet_heatmap.py @@ -18,9 +18,12 @@ from hansken.query import RangeFacet # The line below finds out if we run in the browser by checking for the js module in_browser = 'js' in sys.modules + hansken_host = '' +hansken_project = '5ee273fd-0978-4a0a-b8b0-2af2f8479214' + context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', + project=hansken_project, keystore=f'http://{hansken_host}:9090/keystore/', # Authentication is faked if we run in the browser, # because an authenticated session should already be present diff --git a/04 types_in_piechart.py b/04 types_in_piechart.py index 5a25e60..748ee3d 100644 --- a/04 types_in_piechart.py +++ b/04 types_in_piechart.py @@ -12,9 +12,12 @@ from hansken.query import TermFacet # The line below finds out if we run in the browser by checking for the js module in_browser = 'js' in sys.modules + hansken_host = '' +hansken_project = '5ee273fd-0978-4a0a-b8b0-2af2f8479214' + context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', + project=hansken_project, keystore=f'http://{hansken_host}:9090/keystore/', # Authentication is faked if we run in the browser, # because an authenticated session should already be present diff --git a/05 unique_values_treemap_chatmessage.py b/05 unique_values_treemap_chatmessage.py index 80fe4fa..9f69b0c 100644 --- a/05 unique_values_treemap_chatmessage.py +++ b/05 unique_values_treemap_chatmessage.py @@ -12,9 +12,12 @@ from hansken.connect import connect_project # The line below finds out if we run in the browser by checking for the js module in_browser = 'js' in sys.modules + hansken_host = '' +hansken_project = '5ee273fd-0978-4a0a-b8b0-2af2f8479214' + context = connect_project(endpoint=f'http://{hansken_host}:9091/gatekeeper/', - project='5ee273fd-0978-4a0a-b8b0-2af2f8479214', + project=hansken_project, keystore=f'http://{hansken_host}:9090/keystore/', # Authentication is faked if we run in the browser, # because an authenticated session should already be present