large refactoring of new code
diff --git a/config.py b/config.py
index 6dd1a9b..a33f9b5 100644
--- a/config.py
+++ b/config.py
@@ -1,7 +1,7 @@
-import argparse
-import sys
-import yaml
import os
+# import sys
+import yaml
+# import argparse
def parse_config(file_name):
@@ -11,18 +11,19 @@
return cfg
-parser = argparse.ArgumentParser(description="config file name")
-parser.add_argument("-p", "--path")
-parser.add_argument("-b", "--basedir")
-parser.add_argument("-t", "--testpath")
-parser.add_argument("-d", "--database")
-parser.add_argument("-c", "--chartpath")
+# WTX???
+# parser = argparse.ArgumentParser(description="config file name")
+# parser.add_argument("-p", "--path")
+# parser.add_argument("-b", "--basedir")
+# parser.add_argument("-t", "--testpath")
+# parser.add_argument("-d", "--database")
+# parser.add_argument("-c", "--chartpath")
-config = parser.parse_args(sys.argv[1:])
+# config = parser.parse_args(sys.argv[1:])
path = "config.yaml"
-if not config.path is None:
- path = config.path
+# if config.path is not None:
+# path = config.path
cfg_dict = parse_config(os.path.join(os.path.dirname(__file__), path))
basedir = cfg_dict['paths']['basedir']
@@ -31,16 +32,14 @@
DATABASE_URI = cfg_dict['paths']['DATABASE_URI']
CHARTS_IMG_PATH = cfg_dict['paths']['CHARTS_IMG_PATH']
-if not config.basedir is None:
- basedir = config.basedir
+# if config.basedir is not None:
+# basedir = config.basedir
-if not config.testpath is None:
- TEST_PATH = config.testpath
+# if config.testpath is not None:
+# TEST_PATH = config.testpath
-if not config.database is None:
- DATABASE_URI = config.database
+# if config.database is not None:
+# DATABASE_URI = config.database
-if not config.chartpath is None:
- CHARTS_IMG_PATH = config.chartpath
-
-
+# if config.chartpath is not None:
+# CHARTS_IMG_PATH = config.chartpath