forked from work-hard-play-harder/EpiML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
46 lines (36 loc) · 1.63 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'R\xb7\xff\xfc\x1a\x94\xd3\xfa\xce\x1e\x1az+J!\xdfW\xf7k\x9br\xd9?\xc5'
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'database.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
# for upload file
UPLOAD_FOLDER = os.path.join(basedir, 'EpiML', 'upload_data')
ALLOWED_EXTENSIONS = set(['txt', 'csv'])
MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5Mb limit
# for datasets
SAMPLE_DATA_DIR = os.path.join(basedir, 'EpiML', 'datasets', 'sample_data')
MIR2DISEASE_DIR = os.path.join(basedir, 'EpiML', 'datasets', 'miR2Disease')
MIR2BASE_DIR = os.path.join(basedir, 'EpiML', 'datasets', 'miRBase')
# scripts dir
SCRIPTS_DIR = os.path.join(basedir, 'EpiML', 'scripts')
# for run scripts
EBEN_SCRIPT = os.path.join(SCRIPTS_DIR, 'EBEN.R')
LASSO_SCRIPT = os.path.join(SCRIPTS_DIR, 'LASSO.R')
SSLASSO_SCRIPT = os.path.join(SCRIPTS_DIR, 'ssLASSO.R')
# for mail
# MAIL_SERVER = 'localhost'
# MAIL_PORT = 25
# MAIL_USE_TLS = False
# MAIL_USE_SSL = False
# MAIL_USERNAME = '[email protected]'
# MAIL_PASSWORD = None
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'Keepsmile_520'
# for celery
CELERY_BROKER_URL = os.environ.get('CELERY_BROKER_URL') or 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND') or 'redis://localhost:6379/0'