add tests and utils : limit values, get max in enums

This commit is contained in:
Tykayn 2025-04-10 12:53:03 +02:00 committed by tykayn
parent aa35803a0b
commit b4c28335b2
10 changed files with 153 additions and 43 deletions

View file

@ -19,6 +19,7 @@ const MappingIRVE: MappingConfigType = {
* select only certain points from the source
*/
filters: {
// offset: 1, // limiter à une feature pour faire des tests
enable_coordinates_filter: false,
enable_properties_filter: true,
// filter_points_older_than_year: 2024,
@ -60,11 +61,12 @@ const MappingIRVE: MappingConfigType = {
key_converted: 'operator:phone',
convert_to_phone: true, // conversion en format international si possible
},
contact_operateur: 'operator:email', // ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
contact_operateur: 'operator:email',
id_station_itinerance: {
key_converted: 'ref:EU:EVSE',
remove_stars: true,
truncate_enums_to_limit: 255,
},
id_station_local: 'ref',
@ -84,6 +86,7 @@ const MappingIRVE: MappingConfigType = {
},
reservation: {
key_converted: 'reservation',
convert_to_boolean_value: true, // convertit en yes ou no
},
// observations: 'note',
@ -125,6 +128,7 @@ const MappingIRVE: MappingConfigType = {
},
// ******** champs plus complexes
horaires: 'opening_hours', // déjà au bon format, enfin, en général. vérifier avec le validateur josm.
tarification: 'charge',
paiement_cb: {
key_converted: 'payment:credit_cards',
// ignore_if_falsy: true,