mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-10-09 17:02:46 +02:00
add tests and failsafe for values true and false
This commit is contained in:
parent
5b0271716c
commit
cb6075fc61
10 changed files with 376 additions and 230 deletions
|
@ -29,7 +29,7 @@ const MappingIRVE: MappingConfigType = {
|
|||
enable_properties_filter: true,
|
||||
// filter_points_older_than_year: 2024,
|
||||
// filter_points_by_year_property: 'date_mise_en_service',
|
||||
// filter_points_lesser_than_NkW: 50 // ne pas sortir les points qui ont moins de ce nombre de puissance nominale
|
||||
// filter_points_lesser_than_NkW: 20 // ne pas sortir les points qui ont moins de ce nombre de puissance nominale
|
||||
// add only geojson points who are found having this regex in the zipcode properties
|
||||
// properties: {
|
||||
// consolidated_code_postal: '^[76|27]'
|
||||
|
@ -50,7 +50,12 @@ const MappingIRVE: MappingConfigType = {
|
|||
"gratuit",
|
||||
"paiement_acte",
|
||||
"paiement_cb",
|
||||
"cable_t2_attache"
|
||||
"cable_t2_attache",
|
||||
"socket:typee",
|
||||
"socket:type2_combo",
|
||||
"socket:chademo",
|
||||
"socket:type2",
|
||||
"socket:type2_cable",
|
||||
],
|
||||
tags: {
|
||||
// ******* nombres
|
||||
|
@ -90,12 +95,12 @@ const MappingIRVE: MappingConfigType = {
|
|||
paiement_acte:
|
||||
{
|
||||
key_converted: 'authentication:none',
|
||||
convert_to_boolean_value: true, // convertit en yes ou no
|
||||
convert_to_boolean_value: true,
|
||||
|
||||
},
|
||||
reservation: {
|
||||
key_converted: 'reservation',
|
||||
convert_to_boolean_value: true, // convertit en yes ou no
|
||||
convert_to_boolean_value: true,
|
||||
},
|
||||
// observations: 'note',
|
||||
nom_station: 'description',
|
||||
|
@ -116,27 +121,21 @@ const MappingIRVE: MappingConfigType = {
|
|||
,
|
||||
prise_type_ef: {
|
||||
key_converted: 'socket:typee',
|
||||
ignore_if_falsy: true,
|
||||
convert_to_boolean_value: true,
|
||||
keep_only_max_in_enum: true,
|
||||
keep_only_truthy_yes_or_no_without_enum: true,
|
||||
},
|
||||
prise_type_2: {
|
||||
key_converted: 'socket:type2',
|
||||
ignore_if_falsy: true,
|
||||
convert_to_boolean_value: true,
|
||||
keep_only_max_in_enum: true,
|
||||
// on convertit en yes ou no, sans enum, et on ne garde que si on obtient "yes"
|
||||
keep_only_truthy_yes_or_no_without_enum: true,
|
||||
|
||||
},
|
||||
prise_type_combo_ccs: {
|
||||
key_converted: 'socket:type2_combo',
|
||||
ignore_if_falsy: true,
|
||||
convert_to_boolean_value: true,
|
||||
keep_only_max_in_enum: true,
|
||||
keep_only_truthy_yes_or_no_without_enum: true,
|
||||
},
|
||||
prise_type_chademo: {
|
||||
key_converted: 'socket:chademo',
|
||||
ignore_if_falsy: true,
|
||||
convert_to_boolean_value: true,
|
||||
keep_only_max_in_enum: true,
|
||||
keep_only_truthy_yes_or_no_without_enum: true,
|
||||
},
|
||||
// ******** champs plus complexes
|
||||
horaires: 'opening_hours', // déjà au bon format, enfin, en général. vérifier avec le validateur josm.
|
||||
|
@ -149,9 +148,7 @@ const MappingIRVE: MappingConfigType = {
|
|||
accessibilite_pmr: {
|
||||
key_converted: "wheelchair",
|
||||
conditional_values: {
|
||||
"Accessibilité inconnue": {
|
||||
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
|
||||
},
|
||||
|
||||
"Accessible mais non réservé PMR": {
|
||||
value_converted: "yes"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue