X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/predictops.git/blobdiff_plain/66b4627c14e9f89a2e5ab73bbf48819f8f3a1455..964c1b87a6996c828c150a2b06a827350a4c2b10:/predictops/source/meteofrance.py?ds=sidebyside 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