Browse Source

更新 import 方式

lmstack 3 years ago
parent
commit
f0ffce912b

+ 5 - 4
LIB/BACKEND/DataPreProcess.py

@@ -5,15 +5,16 @@
 __author__ = 'Wang Liming'
 
 
-import CONFIGURE.PathSetting as PathSetting
-import sys
-sys.path.append(PathSetting.backend_path)
+# import CONFIGURE.PathSetting as PathSetting
+# import sys
+# sys.path.append(PathSetting.backend_path)
+# from LIB.BACKEND
 from os import defpath
 import pandas as pd
 import numpy as np
 import pdb
 from numba import jit
-import Tools
+from LIB.BACKEND import Tools
 
 class DataPreProcess:
     def __init__(self):

+ 4 - 3
LIB/BACKEND/Tools.py

@@ -5,9 +5,10 @@
 __author__ = 'Wang Liming'
 
 
-import CONFIGURE.PathSetting as PathSetting
-import sys
-sys.path.append(PathSetting.backend_path)
+# import CONFIGURE.PathSetting as PathSetting
+# import sys
+# sys.path.append(PathSetting.backend_path)
+from LIB.BACKEND import DBManager
 import DBManager
 import pandas as pd
 import numpy as np

+ 11 - 10
LIB/FRONTEND/day_sta.py

@@ -1,16 +1,17 @@
 __author__ = 'Wang Liming'
 
 # 每日指标统计函数
-import CONFIGURE.PathSetting as PathSetting
-import sys
-sys.path.append(PathSetting.backend_path)
-sys.path.append(PathSetting.middle_path)
-import DBManager
-import Tools
-import DataPreProcess
-import IndexStaByPeriod
-import Log
-import IndexStaByPeriod
+# import CONFIGURE.PathSetting as PathSetting
+# import sys
+# sys.path.append(PathSetting.backend_path)
+# sys.path.append(PathSetting.middle_path)
+from LIB.BACKEND import DBManager, Log, DataPreProcess
+from LIB.MIDDLE import IndexStaByPeriod, IndexStaBOneCycle
+from LIB.BACKEND import DBManager
+from LIB.BACKEND import DBManager
+from LIB.BACKEND import DBManager
+from LIB.BACKEND import DBManager
+
 import importlib
 import datetime
 import os

+ 5 - 5
LIB/MIDDLE/IndexStaByOneCycle.py

@@ -4,11 +4,11 @@
 '''
 __author__ = 'Wang Liming'
 
-import CONFIGURE.PathSetting as PathSetting
-import sys
-sys.path.append(PathSetting.backend_path)
-import datetime
-import Tools
+# import CONFIGURE.PathSetting as PathSetting
+# import sys
+# sys.path.append(PathSetting.backend_path)
+# import datetime
+# import Tools
 import pandas as pd
 import numpy as np
 

+ 5 - 5
LIB/MIDDLE/IndexStaByPeriod.py

@@ -4,15 +4,15 @@
 '''
 __author__ = 'Wang Liming'
 
-import CONFIGURE.PathSetting as PathSetting
-import sys
-sys.path.append(PathSetting.backend_path)
-sys.path.append(PathSetting.middle_path)
+# import CONFIGURE.PathSetting as PathSetting
+# import sys
+# sys.path.append(PathSetting.backend_path)
+# sys.path.append(PathSetting.middle_path)
 import datetime
 import Tools
 import pandas as pd
 import numpy as np
-import IndexStaByOneCycle
+from LIB.MIDDLE import IndexStaByOneCycle
 
 class IndexStaByPeriod():
     def __init__(self):

+ 7 - 7
LIB/MIDDLE/SignalMonitor.py

@@ -1,15 +1,15 @@
 import datetime
-import os
+# import os
 import pandas as pd
-import Tools
-import sys
-import xlutils
+# import Tools
+# import sys
+# import xlutils
 from xlrd import open_workbook
 from xlutils.copy import copy
 
-import CONFIGURE.PathSetting as PathSetting
-sys.path.append(PathSetting.backend_path)
-import DBManager
+# import CONFIGURE.PathSetting as PathSetting
+# sys.path.append(PathSetting.backend_path)
+from LIB.BACKEND import DBManager
 dbManager = DBManager.DBManager()
 
 class SignalMonitor():