From eed0837b23e40e63fa3b1a9aa4018470b74a977a Mon Sep 17 00:00:00 2001 From: Walker Waylon Scott Date: Mon, 26 Jun 2017 19:34:03 -0500 Subject: [PATCH] feat(settings) Initial Commit of settings Sets up directory structures. --- notebooks/settings.py | 23 +++++++++++++++++++++++ src/settings.py | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 notebooks/settings.py create mode 100644 src/settings.py diff --git a/notebooks/settings.py b/notebooks/settings.py new file mode 100644 index 0000000..a6536cd --- /dev/null +++ b/notebooks/settings.py @@ -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) diff --git a/src/settings.py b/src/settings.py new file mode 100644 index 0000000..a6536cd --- /dev/null +++ b/src/settings.py @@ -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)