+from csv import DictReader
+from logging import getLogger
+from logging.config import fileConfig
+from os import listdir
+from pathlib import Path
+
+fileConfig((Path.cwd() / 'config') / 'logging.cfg')
+logger = getLogger()
+
+
+class Source:
+ def __init__(self):
+ '''
+ Check if the same feature name is used in two different feature sources
+ '''
+ logger.info('Check for redondant feature names')
+ csv_files = Path.cwd() / 'config' / 'features'
+ list_of_names = []
+ for csv_file in listdir(csv_files):
+ with open(csv_file, "r") as f:
+ reader = DictReader(f, delimiter=',')
+ list_of_names.extend([row['name'] for row in reader])
+ if len(list_of_names) != len(set(list_of_names)):
+ raise ValueError("At least two features have the same name")
\ No newline at end of file