+ raise ValueError("At least two features have the same name")
+
+ logger.info('Check for specified feature types')
+ names_of_mixed_types = []
+ for file_name in listdir(feature_files):
+ if file_name.endswith('csv'):
+ with open(feature_files / file_name, "r") as f:
+ reader = DictReader(f, delimiter=',')
+ names_of_mixed_types.extend([row['name'] for row in reader
+ if row['type'] == '3'])
+
+ cfg_names_of_mixed_types = []
+ for file_name in listdir(feature_files):
+ if file_name.endswith('cfg'):
+ config = ConfigParser()
+ config.read(feature_files / file_name)
+ for section in config:
+ if config.has_option(section, 'numerical'):
+ cfg_names_of_mixed_types.append(section)
+
+ if sorted(names_of_mixed_types) != sorted(cfg_names_of_mixed_types):
+ raise ValueError(f"Problem with features of mixed types: "
+ f"{set(names_of_mixed_types).symmetric_difference(cfg_names_of_mixed_types)}")