]> AND Private Git Repository - predictops.git/blobdiff - lib/source/__init__.py
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Adding packages for target and learn
[predictops.git] / lib / source / __init__.py
index d2c2a0f9910e5981106b55c3a539e2b30480dc6e..527538dc22068b2b132b65859781c166abdd8a3b 100644 (file)
@@ -1,25 +1 @@
-from .meteofrance import MeteoFrance
-
-from extomeAI.lib.connector import PostgreSQLDBConnection
-
-from csv import DictReader
-from logging.config import fileConfig
-from pathlib import Path
-
-import logging
-
-fileConfig((Path.cwd() / 'config') / 'logging.cfg')
-logger = logging.getLogger()
-
-with PostgreSQLDBConnection.Instance() as db:
-    db.cursor.execute('SELECT count(*) FROM "PARAMETER";')
-    nb_parameters = db.cursor.fetchone()[0]
-    if not nb_parameters:
-        logger.info('Inserting PARAMETER values from parameters.csv')            
-        csv_file = Path.cwd() / 'config' / 'features' / 'parameters.csv'
-        with open(csv_file, "r") as f:                
-            reader = DictReader(f, delimiter=',')
-            for row in reader:
-                request = f"""INSERT INTO "PARAMETER" ("PARAM_NAME")
-                              VALUES ('{row['PARAM_NAME']}');"""
-                db.cursor.execute(request)
+from .meteofrance import MeteoFrance
\ No newline at end of file