-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
57 lines (41 loc) · 955 Bytes
/
config.py
File metadata and controls
57 lines (41 loc) · 955 Bytes
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
47
48
49
50
51
52
53
54
55
56
57
"""Configurations.
Usage:
>>> from src import config
"""
# %%
# Preamble
import logging
from pathlib import Path
logging.basicConfig(
format="{asctime} - {levelname} - {name} - {message}",
style="{",
datefmt="%Y-%m-%d %H:%M:%S",
)
# The global config should not be redefine
# The config can still be overridden in custom loggers
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
# %%
# Paths
PROJ_ROOT = Path(__file__).resolve().parents[1]
logger.info("PROJ_ROOT path is: %s", PROJ_ROOT)
DATA_DIR = PROJ_ROOT / "data"
RES_DIR = PROJ_ROOT / "results"
# %%
# Palettes and plotting defaults
CB_PALETTE = [
"#999999",
"#E69F00",
"#56B4E9",
"#009E73",
"#F0E442",
"#0072B2",
"#D55E00",
"#CC79A7",
]
CBB_PALETTE = CB_PALETTE.copy()
CBB_PALETTE[0] = "#000000"
# os.environ["MATPLOTLIBRC"] = str(PROJ_ROOT / "matplotlibrc")
# %%
logger.info("All configurations have been set.")
# %%