import os
import json
import logging
import logging.config

# boilerplate for registering the data directories
DATA_ROOT_DIR = os.getenv('BHABANA_DATA',
                          os.path.expanduser(os.path.join('~', '.bhabana')))
DATASET_DIR = os.path.join(DATA_ROOT_DIR, 'datasets')
MODELS_DIR = os.path.join(DATA_ROOT_DIR, 'models')
EXPERIMENTS_DIR = os.path.join(DATA_ROOT_DIR, 'experiments')
# url to download the data from. It can be downloaded manually too.
BASE_URL = 'http://52.29.250.192:3000/'
DATA_REGISTER = {
    "amazon_reviews_de": {"type": "dataset", "lang": "de",
                          "release_version": "0.1.0", "desc": "This dataset has"
                                                      " been generated by ' \
                                   'scraping Amazon Reviews"},
    "hotel_reviews_de": {"type": "dataset", "lang": "en",
                         "release_version": "0.1.0",
                         "desc": "This dataset is from CMU. Here is the link "
                                 "to the dataset http://www.cs.cmu.edu/~jiweil/html/ hotel-review.html "
                                 "\nIt has 553494 Training Instances 263568 "
                                 "Test Instances and 61499 Validation"
                                 " Instances"}
}

# Create a directory structure for keeping all the data related to Ovation
if not os.path.exists(DATASET_DIR):
    os.makedirs(DATASET_DIR)

if not os.path.exists(MODELS_DIR):
    os.makedirs(MODELS_DIR)

if not os.path.exists(EXPERIMENTS_DIR):
    os.makedirs(EXPERIMENTS_DIR)