@@ -19,62 +19,17 @@ def create_app():
1919 # Travis
2020 print ("We are now loading configuration." )
2121 bar_app .config .from_pyfile (os .getcwd () + "/config/BAR_API.cfg" , silent = True )
22- if bar_app .config .get ("ADMIN_ENCRYPT_KEY" ):
23- os .environ ["ADMIN_ENCRYPT_KEY" ] = bar_app .config .get (
24- "TEST_ADMIN_ENCRYPT_KEY"
25- )
26- if bar_app .config .get ("ADMIN_PASSWORD_FILE" ):
27- os .environ ["ADMIN_PASSWORD_FILE" ] = bar_app .config .get (
28- "TEST_ADMIN_PASSWORD_FILE"
29- )
30- if bar_app .config .get ("ADMIN_EMAIL" ):
31- os .environ ["ADMIN_EMAIL" ] = bar_app .config .get ("ADMIN_EMAIL" )
32- if bar_app .config .get ("EMAIL_PASS_KEY" ):
33- os .environ ["EMAIL_PASS_KEY" ] = bar_app .config .get ("EMAIL_PASS_KEY" )
34- if bar_app .config .get ("EMAIL_PASS_FILE" ):
35- os .environ ["EMAIL_PASS_FILE" ] = bar_app .config .get ("EMAIL_PASS_FILE" )
22+
3623 elif os .environ .get ("BAR" ):
3724 # The BAR
3825 bar_app .config .from_pyfile (os .environ .get ("BAR_API_PATH" ), silent = True )
39- if bar_app .config .get ("ADMIN_EMAIL" ):
40- os .environ ["ADMIN_EMAIL" ] = bar_app .config .get ("ADMIN_EMAIL" )
41- if bar_app .config .get ("EMAIL_PASS_KEY" ):
42- os .environ ["EMAIL_PASS_KEY" ] = bar_app .config .get ("EMAIL_PASS_KEY" )
43- if bar_app .config .get ("EMAIL_PASS_FILE" ):
44- os .environ ["EMAIL_PASS_FILE" ] = bar_app .config .get ("EMAIL_PASS_FILE" )
45- if bar_app .config .get ("ADMIN_ENCRYPT_KEY" ):
46- os .environ ["ADMIN_ENCRYPT_KEY" ] = bar_app .config .get ("ADMIN_ENCRYPT_KEY" )
47- if bar_app .config .get ("ADMIN_PASSWORD_FILE" ):
48- os .environ ["ADMIN_PASSWORD_FILE" ] = bar_app .config .get (
49- "ADMIN_PASSWORD_FILE"
50- )
51- if bar_app .config .get ("DRIVE_LIST_KEY" ):
52- os .environ ["DRIVE_LIST_KEY" ] = bar_app .config .get ("DRIVE_LIST_KEY" )
53- if bar_app .config .get ("DRIVE_LIST_FILE" ):
54- os .environ ["DRIVE_LIST_FILE" ] = bar_app .config .get ("DRIVE_LIST_FILE" )
5526 else :
5627 # The localhost
5728 bar_app .config .from_pyfile (
5829 os .path .expanduser ("~" ) + "/.config/BAR_API.cfg" , silent = True
5930 )
6031
6132 # Load environment variables
62- if bar_app .config .get ("ADMIN_ENCRYPT_KEY" ):
63- os .environ ["ADMIN_ENCRYPT_KEY" ] = bar_app .config .get ("ADMIN_ENCRYPT_KEY" )
64- if bar_app .config .get ("ADMIN_PASSWORD_FILE" ):
65- os .environ ["ADMIN_PASSWORD_FILE" ] = bar_app .config .get (
66- "ADMIN_PASSWORD_FILE"
67- )
68- if bar_app .config .get ("ADMIN_EMAIL" ):
69- os .environ ["ADMIN_EMAIL" ] = bar_app .config .get ("ADMIN_EMAIL" )
70- if bar_app .config .get ("EMAIL_PASS_KEY" ):
71- os .environ ["EMAIL_PASS_KEY" ] = bar_app .config .get ("EMAIL_PASS_KEY" )
72- if bar_app .config .get ("EMAIL_PASS_FILE" ):
73- os .environ ["EMAIL_PASS_FILE" ] = bar_app .config .get ("EMAIL_PASS_FILE" )
74- if bar_app .config .get ("DRIVE_LIST_KEY" ):
75- os .environ ["DRIVE_LIST_KEY" ] = bar_app .config .get ("DRIVE_LIST_KEY" )
76- if bar_app .config .get ("DRIVE_LIST_FILE" ):
77- os .environ ["DRIVE_LIST_FILE" ] = bar_app .config .get ("DRIVE_LIST_FILE" )
7833 if bar_app .config .get ("PHENIX" ):
7934 os .environ ["PHENIX" ] = bar_app .config .get ("PHENIX" )
8035 if bar_app .config .get ("PHENIX_VERSION" ):
@@ -96,7 +51,6 @@ def create_app():
9651 tomato_nssnp_db .init_app (bar_app )
9752 tomato_seq_db .init_app (bar_app )
9853 single_cell_db .init_app (bar_app )
99- summarization_db .init_app (bar_app )
10054 rice_interactions_db .init_app (bar_app )
10155
10256 # Initialize the cache
@@ -115,10 +69,7 @@ def create_app():
11569 # Now add routes
11670 from api .resources .gene_information import gene_information
11771 from api .resources .rnaseq_gene_expression import rnaseq_gene_expression
118- from api .resources .summarization_gene_expression import (
119- summarization_gene_expression ,
120- )
121- from api .resources .api_manager import api_manager
72+
12273 from api .resources .proxy import bar_proxy
12374 from api .resources .thalemine import thalemine
12475 from api .resources .snps import snps
@@ -130,8 +81,6 @@ def create_app():
13081
13182 bar_api .add_namespace (gene_information )
13283 bar_api .add_namespace (rnaseq_gene_expression )
133- bar_api .add_namespace (summarization_gene_expression )
134- bar_api .add_namespace (api_manager )
13584 bar_api .add_namespace (bar_proxy )
13685 bar_api .add_namespace (thalemine )
13786 bar_api .add_namespace (snps )
@@ -158,7 +107,6 @@ def create_app():
158107soybean_nssnp_db = SQLAlchemy (metadata = MetaData ())
159108tomato_seq_db = SQLAlchemy (metadata = MetaData ())
160109single_cell_db = SQLAlchemy (metadata = MetaData ())
161- summarization_db = SQLAlchemy (metadata = MetaData ())
162110rice_interactions_db = SQLAlchemy (metadata = MetaData ())
163111
164112# Initialize Redis
0 commit comments