-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.py
More file actions
41 lines (36 loc) · 1.56 KB
/
Copy pathparams.py
File metadata and controls
41 lines (36 loc) · 1.56 KB
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
# -*- coding: utf-8 -*-
import logging
import os
import sys
from banners import BANNERS
from utils.console import Console
from utils.coloredlog import LOGLEVEL_SUCCESS, LOGLEVEL_DISABLE
CONSOLE = Console(colored=True)
# In case you want to overwrite LOGLEVEL_SUCCESS
LOGLEVEL_SUCCESS = 25
# Some interresting path
CUR_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(CUR_DIR,"data")
LOG_DIR = os.path.join(CUR_DIR,"log")
OUT_DIR = os.path.join(CUR_DIR,"out")
sys.path.append(os.path.join(CUR_DIR,"utils")) # In order to solve problem of modules in utils loading other modules in utils
### Following parameters will be ingnore when using cli verion (as will be entered as parameters)
# Logging
# Possible values for a log level using logging module: CRITICAL:50; ERROR:40; WARNING:30; INFO:20, DEBUG:10
# Possible values for a log level using CONSTANTS (can be adapted in init.py): LOGLEVEL_SUCCESS:15; LOGLEVEL_DISABLE:99999
LOGLEVEL_CONSOLE = LOGLEVEL_SUCCESS
LOGLEVEL_FILE = LOGLEVEL_DISABLE
LOG_FILE = None #Sample: os.path.join(LOG_DIR,"logfile.log")
OUT_FILE = None #Sample: os.path.join(OUT_DIR,"output.csv")
IN_FILE = None #Sample: os.path.join(DATA_DIR,"input.csv")
# Banner settings
BANNER_DISPLAY = True
BANNER_SELECTION = "random"
if __name__ == "__main__":
CONSOLE.clear_screen()
if BANNER_DISPLAY:
print(CONSOLE.get_app_banner(selection=BANNER_SELECTION, banner_lst=BANNERS))
print(f"- CUR_DIR: '{CUR_DIR}'")
print(f"- DATA_DIR:'{DATA_DIR}'")
print(f"- LOG_DIR: '{LOG_DIR}'")
print(f"- OUT_DIR: '{OUT_DIR}'")