Parcourir la source

exchange libraries with cdplib

tsteuer il y a 4 ans
Parent
commit
465ce7b828

+ 1 - 1
cdplib/db_migration/DataFrameToCollection.py

@@ -23,7 +23,7 @@ class DataFrameToCollection():
     def __init__(self, schema_path: str):
         '''
         '''
-        from libraries.log import Log
+        from cdplib.log import Log
         import json
 
         self._log = Log("ParseJsonSchema")

+ 1 - 1
cdplib/db_migration/FlattenData.py

@@ -13,7 +13,7 @@ import time
 import pandas as pd
 import copy
 sys.path.append(os.getcwd())
-from libraries.log import Log
+from cdplib.log import Log
 log = Log("Flatten data")
 
 class FlattenData():

+ 8 - 8
cdplib/db_migration/MigrationCleaning.py

@@ -14,11 +14,11 @@ import gc
 
 sys.path.append(os.getcwd())
 
-from libraries.db_migration.ParseMapping import ParseMapping
-from libraries.db_migration.ParseJsonSchema import ParseJsonSchema
-from libraries.utils.ExceptionsHandler import ExceptionsHandler
-from libraries.utils.CleaningUtils import CleaningUtils
-from libraries.log import Log
+from cdplib.db_migration.ParseMapping import ParseMapping
+from cdplib.db_migration.ParseJsonSchema import ParseJsonSchema
+from cdplib.utils.ExceptionsHandler import ExceptionsHandler
+from cdplib.utils.CleaningUtils import CleaningUtils
+from cdplib.log import Log
 
 class MigrationCleaning:
     '''
@@ -58,7 +58,7 @@ class MigrationCleaning:
         self._mapping_path = mapping_path
         self._schema_paths = schema_paths
 
-        from libraries.db_handlers.SQLHandler import SQLHandlerPool
+        from cdplib.db_handlers.SQLHandler import SQLHandlerPool
         self._sql_db = SQLHandlerPool(20)
 
     def _assert_dataframe_input(self, data: pd.DataFrame):
@@ -213,7 +213,7 @@ class MigrationCleaning:
                              reason: (str, pd.Series)) -> pd.DataFrame:
         '''
         '''
-        from libraries.db_handlers.SQLHandler import SQLHandler
+        from cdplib.db_handlers.SQLHandler import SQLHandler
 
         assert((self._inconsist_report_table is not None) and
                (self._filter_index_columns is not None)),\
@@ -517,7 +517,7 @@ if __name__ == "__main__":
 
     # testing
 
-    from libraries.db_handlers.SQLHandler import SQLHandler
+    from cdplib.db_handlers.SQLHandler import SQLHandler
 
     mapping_path = os.path.join(".", "migration_mappings", "rs1_mapping.json")
 

+ 1 - 1
cdplib/db_migration/ParseDbSchema.py

@@ -18,7 +18,7 @@ class ParseDbSchema(metaclass=abc.ABCMeta):
     def __init__(self, schema_paths: [list, str], log_file: str = None):
         '''
         '''
-        from libraries.log import Log
+        from cdplib.log import Log
 
         self._log = Log(name="ParseDbSchema:", log_file=log_file)
 

+ 2 - 2
cdplib/db_migration/ParseJsonSchema.py

@@ -13,7 +13,7 @@ import numpy as np
 
 sys.path.append(os.getcwd())
 
-from libraries.db_migration.ParseDbSchema import ParseDbSchema
+from cdplib.db_migration.ParseDbSchema import ParseDbSchema
 
 
 class ParseJsonSchema(ParseDbSchema):
@@ -25,7 +25,7 @@ class ParseJsonSchema(ParseDbSchema):
         '''
         '''
         import json
-        from libraries.log import Log
+        from cdplib.log import Log
 
         super().__init__(schema_paths=schema_paths, log_file=log_file)
 

+ 2 - 2
cdplib/db_migration/ParseMapping.py

@@ -10,7 +10,7 @@ import os
 import sys
 import numpy as np
 sys.path.append(os.getcwd())
-from libraries.log import Log
+from cdplib.log import Log
 
 class ParseMapping:
     '''
@@ -21,7 +21,7 @@ class ParseMapping:
         '''
         '''
         import json
-        from libraries.log import Log
+        from cdplib.log import Log
 
         log = Log('Parse Mapping')
 

+ 0 - 1
setup.py

@@ -1,7 +1,6 @@
 from setuptools import setup,find_packages
 
 INSTALL_REQUIRES = [
-    'numpy'
 ]