feat(settings) Initial Commit of settings
Sets up directory structures.
This commit is contained in:
parent
2b58d707f5
commit
eed0837b23
2 changed files with 46 additions and 0 deletions
23
notebooks/settings.py
Normal file
23
notebooks/settings.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from matplotlib import rcParams
|
||||
|
||||
try:
|
||||
root_dir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
|
||||
except NameError:
|
||||
root_dir = os.path.abspath(os.path.dirname(_dh[0]))
|
||||
except NameError:
|
||||
root_dir = os.path.abspath(os.path.dirname(os.getcwd))
|
||||
|
||||
reports_dir = os.path.join(root_dir, 'reports')
|
||||
data_dir = os.path.join(root_dir, 'data')
|
||||
raw_data_dir = os.path.join(root_dir, 'data', 'raw')
|
||||
processed_data_dir = os.path.join(root_dir, 'data', 'processed')
|
||||
src_dir = os.path.join(root_dir, 'src')
|
||||
analysis_dir = os.path.dirname(root_dir)
|
||||
static_dir = os.path.join(src_dir, 'static')
|
||||
|
||||
sys.path.append(analysis_dir)
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(src_dir)
|
||||
23
src/settings.py
Normal file
23
src/settings.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from matplotlib import rcParams
|
||||
|
||||
try:
|
||||
root_dir = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
|
||||
except NameError:
|
||||
root_dir = os.path.abspath(os.path.dirname(_dh[0]))
|
||||
except NameError:
|
||||
root_dir = os.path.abspath(os.path.dirname(os.getcwd))
|
||||
|
||||
reports_dir = os.path.join(root_dir, 'reports')
|
||||
data_dir = os.path.join(root_dir, 'data')
|
||||
raw_data_dir = os.path.join(root_dir, 'data', 'raw')
|
||||
processed_data_dir = os.path.join(root_dir, 'data', 'processed')
|
||||
src_dir = os.path.join(root_dir, 'src')
|
||||
analysis_dir = os.path.dirname(root_dir)
|
||||
static_dir = os.path.join(src_dir, 'static')
|
||||
|
||||
sys.path.append(analysis_dir)
|
||||
sys.path.append(root_dir)
|
||||
sys.path.append(src_dir)
|
||||
Loading…
Add table
Add a link
Reference in a new issue