aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-09-25 05:22:23 +0300
committerFrederick Muriuki Muriithi2021-09-25 05:22:23 +0300
commit62f26b901e49effb0105e517093fd873815c470c (patch)
treebc6c160f87fa2288c6bde5099f5c499c0ebc75b9
parent82a2480dd4ffd74f54334ff9a2d4eed8272daa47 (diff)
downloadgenenetwork2-62f26b901e49effb0105e517093fd873815c470c.tar.gz
Remove hard-coded URL; use configured URL
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/clustering.gmi * etc/default_settings.py: remove duplicate configuration variable * wqflask/wqflask/collect.py: use the configured url for the API server Use the configured URL rather that the hard-coded URL that was used for testing out the clustered heatmap generation.
-rw-r--r--etc/default_settings.py1
-rw-r--r--wqflask/wqflask/collect.py8
2 files changed, 5 insertions, 4 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py
index a194b10e..023aa53b 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -25,7 +25,6 @@ import os
import sys
GN_VERSION = open("../etc/VERSION", "r").read()
-GN_SERVER_URL = "http://localhost:8880/" # REST API server
# ---- MySQL
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 41ff47ae..3475ae5d 100644
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -12,6 +12,7 @@ from flask import flash
from wqflask import app
from utility import hmac
from utility.formatting import numify
+from utility.tools import GN_SERVER_URL
from utility.redis_tools import get_redis_conn
from base.trait import create_trait
@@ -218,9 +219,10 @@ def view_collection():
json_version.append(jsonable(trait_ob))
- collection_info = dict(trait_obs=trait_obs,
- uc=uc,
- heatmap_data_url="http://localhost:8080/api/heatmaps/clustered")
+ collection_info = dict(
+ trait_obs=trait_obs,
+ uc=uc,
+ heatmap_data_url=f"{GN_SERVER_URL}api/heatmaps/clustered")
if "json" in params:
return json.dumps(json_version)