aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/gen_select_dataset.py
diff options
context:
space:
mode:
authorzsloan2018-04-09 17:25:15 +0000
committerzsloan2018-04-09 17:25:15 +0000
commit1cf4b598dd986760627eef4144c0445679c97866 (patch)
treea908d2f074245d2e5baff1509c97478e2cfe550c /wqflask/maintenance/gen_select_dataset.py
parentad71cfe2828a2cc7378b83c0b0f476b53e7dd03b (diff)
downloadgenenetwork2-1cf4b598dd986760627eef4144c0445679c97866.tar.gz
Removed unused code from get_select_dataset.py and get_group_samplelists.py scripts
Diffstat (limited to 'wqflask/maintenance/gen_select_dataset.py')
-rw-r--r--wqflask/maintenance/gen_select_dataset.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index f62d0cc1..16dcebc5 100644
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -66,7 +66,7 @@ from pprint import pformat as pf
print('WARNING: This conversion is now OBSOLETE as the menu gets built from the database in Javascript using GN_SERVER instead!')
-def parse_db_uri(db_uri):
+def parse_db_uri():
"""Converts a database URI to the db name, host name, user name, and password"""
parsed_uri = urlparse.urlparse(SQL_URI)
@@ -81,7 +81,6 @@ def parse_db_uri(db_uri):
return db_conn_info
-
def get_species():
"""Build species list"""
Cursor.execute("select Name, MenuName from Species where Species.Name != 'macaque monkey' order by OrderId")
@@ -268,7 +267,7 @@ def build_datasets(species, group, type_name):
def main():
"""Generates and outputs (as json file) the data for the main dropdown menus on the home page"""
- parse_db_uri(SQL_URI)
+ parse_db_uri()
species = get_species()
groups = get_groups(species)
@@ -307,6 +306,6 @@ def _test_it():
#print("build_datasets:", pf(datasets))
if __name__ == '__main__':
- Conn = MySQLdb.Connect(**parse_db_uri(SQL_URI))
+ Conn = MySQLdb.Connect(**parse_db_uri())
Cursor = Conn.cursor()
- main()
+ main() \ No newline at end of file