aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/default_settings.py8
-rw-r--r--wqflask/base/data_set.py14
-rw-r--r--wqflask/wqflask/api/gen_menu.py5
3 files changed, 9 insertions, 18 deletions
diff --git a/etc/default_settings.py b/etc/default_settings.py
index 4a35f42d..55f06a68 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -45,13 +45,13 @@ SECRET_HMAC_CODE = '\x08\xdf\xfa\x93N\x80\xd9\\H@\\\x9f`\x98d^\xb4a;\xc6OM\x946a
GITHUB_CLIENT_ID = "UNKNOWN"
GITHUB_CLIENT_SECRET = "UNKNOWN"
-GITHUB_AUTH_URL = "UNKNOWN"
-GITHUB_API_URL = "UNKNOWN"
+GITHUB_AUTH_URL = "https://github.com/login/oauth/authorize"
+GITHUB_API_URL = "https://api.github.com/user"
ORCID_CLIENT_ID = "UNKNOWN"
ORCID_CLIENT_SECRET = "UNKNOWN"
-ORCID_AUTH_URL = "UNKNOWN"
-ORCID_TOKEN_URL = "UNKNOWN"
+ORCID_AUTH_URL = "https://orcid.org/oauth/authorize"
+ORCID_TOKEN_URL = "https://orcid.org/oauth/token"
ELASTICSEARCH_HOST = "localhost"
ELASTICSEARCH_PORT = '9200'
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 8652e6b7..1f99df49 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -64,7 +64,7 @@ logger = getLogger(__name__ )
# Each subclass will add to this
DS_NAME_MAP = {}
-def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_samplelist = True, group_name = None):
+def create_dataset(dataset_name, dataset_type = None, get_samplelist = True, group_name = None):
if not dataset_type:
dataset_type = Dataset_Getter(dataset_name)
@@ -77,7 +77,7 @@ def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_sampleli
class Dataset_Types(object):
- def __init__(self, rebuild=False):
+ def __init__(self):
"""Create a dictionary of samples where the value is set to Geno,
Publish or ProbeSet. E.g.
@@ -93,13 +93,9 @@ Publish or ProbeSet. E.g.
"""
self.datasets = {}
- if rebuild: #ZS: May make this the only option
- data = json.loads(requests.get(GN2_BASE_URL + "/api/v_pre1/gen_dropdown").content)
- #data = gen_menu.gen_dropdown_json()
- else:
- file_name = "wqflask/static/new/javascript/dataset_menu_structure.json"
- with open(file_name, 'r') as fh:
- data = json.load(fh)
+ data = json.loads(requests.get(GN2_BASE_URL + "/api/v_pre1/gen_dropdown").content)
+ #data = gen_menu.gen_dropdown_json()
+
for species in data['datasets']:
for group in data['datasets'][species]:
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py
index 64a413c2..adf66fb5 100644
--- a/wqflask/wqflask/api/gen_menu.py
+++ b/wqflask/wqflask/api/gen_menu.py
@@ -36,11 +36,6 @@ def gen_dropdown_json():
types=types,
datasets=datasets)
- output_file = """./wqflask/static/new/javascript/dataset_menu_structure.json"""
-
- with open(output_file, 'w') as fh:
- json.dump(data, fh, indent=3, sort_keys=True)
-
return data
def get_species():