X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/predictops.git/blobdiff_plain/66b4627c14e9f89a2e5ab73bbf48819f8f3a1455..ef7617a10d088cccaa6acd8b45a0db76bd8fb61e:/predictops/source/meteofrance.py diff --git a/predictops/source/meteofrance.py b/predictops/source/meteofrance.py index afe18ad..b26c6bf 100644 --- a/predictops/source/meteofrance.py +++ b/predictops/source/meteofrance.py @@ -1,3 +1,5 @@ +from .source import Source + from configparser import ConfigParser from csv import DictReader from datetime import datetime @@ -19,7 +21,7 @@ logger = getLogger() CSV_FILE = Path.cwd() / 'config' / 'features' / 'meteofrance_features.csv' -class MeteoFrance: +class MeteoFrance(Source): _latitude = None _longitude = None @@ -50,9 +52,15 @@ class MeteoFrance: to their names in meteofrance_features.csv (cf. config directory) ''' + # Check for the integrity of feature names + Source.__init__(self) + self._config = ConfigParser() self._config.read(config_file) + self._latitude = self._config['POSITION'].getfloat('latitude') + self._longitude = self._config['POSITION'].getfloat('longitude') + self._data_directory = (Path.cwd() / 'data') / 'features' / 'meteo_france' self._dated_features = None