-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
32 lines (28 loc) · 1.38 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
import os
BASE_URL = "BASE_URL"
OUTPUT_DIR = "OUTPUT_DIR"
MODEL_FILES_DIR = "MODEL_FILES_DIR"
PREDICTIONS_CONFIG_FILE = "PREDICTIONS_CONFIG_FILE"
PREFERENCES_CONFIG_FILE = "PREFERENCES_CONFIG_FILE"
WORKER_USERNAME = "WORKER_USERNAME"
WORKER_PASSWORD = "WORKER_PASSWORD"
class Config(object):
def __init__(self):
"""
Parameters
----------
base_url: URL to the tf-dna-predictions webserver API
output_dir: Writable directory for generated predictions
model_files_dir: Readable directory where .model files are stored
predictions_config_file: Path to the tracks-predictions.yaml config file providing metadata for model files
preferences_config_file: Path to the tracks-preferences.yaml config file providing metadata for model files
worker_username: str: username required for worker specific prediction API endpoints
worker_password: str: password required for worker specific prediction API endpoints
"""
self.base_url = os.environ.get(BASE_URL)
self.output_dir = os.environ.get(OUTPUT_DIR)
self.model_files_dir = os.environ.get(MODEL_FILES_DIR)
self.predictions_config_file = os.environ.get(PREDICTIONS_CONFIG_FILE)
self.preferences_config_file = os.environ.get(PREFERENCES_CONFIG_FILE)
self.worker_username = os.environ.get(WORKER_USERNAME)
self.worker_password = os.environ.get(WORKER_PASSWORD)