1 from lib.source import MeteoFrance
3 from logging import getLogger
4 from logging.config import fileConfig
5 from pathlib import Path
6 from shutil import rmtree
9 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
14 def __init__(self, clean = False):
15 logger.info("Predictops engine launched")
18 print("To prevent from downloading again csv files, copy the archive in data rep")
21 # Cleaning the data directory
22 logger.info("Cleaning and restoring data directory")
23 directory = Path.cwd() / 'data'
24 if directory.is_dir():
26 p = Path(Path.cwd() / 'data')
30 def add_meteofrance(self):
31 self.meteofrance = MeteoFrance()
35 engine = Engine(clean = False)
36 engine.add_meteofrance()
37 engine.meteofrance.update()
38 print(len(engine.meteofrance.dated_features))