Skip to content

Commit 6da9b73

Browse files
committed
Address PR feedback on standardization of regex see HEA-820
1 parent a8b08a4 commit 6da9b73

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

pipelines/assets/livelihood_activity_regexes.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -493,12 +493,6 @@
493493
true,
494494
"quantity_sold"
495495
],
496-
[
497-
"(?P<product_id>eau pour (?:humains|bétail|betail)|farine de [a-zà-ÿ]+){separator_pattern} {name_of_local_measure_pattern}:?\\.?",
498-
"FoodPurchase",
499-
true,
500-
"name_of_local_measure"
501-
],
502496
[
503497
"autre culture(?: de rente)?{separator_pattern} (?:type|nom)",
504498
null,
@@ -512,7 +506,7 @@
512506
"name_of_local_measure"
513507
],
514508
[
515-
"{product_pattern}{separator_pattern} {name_of_local_measure_pattern}\\.?",
509+
"{product_pattern}{separator_pattern} {name_of_local_measure_pattern}:?\\.?",
516510
null,
517511
true,
518512
"name_of_local_measure"

pipelines_tests/test_assets/test_livelihood_activity_regexes.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -881,22 +881,19 @@
881881
"product_id": "sucre",
882882
"attribute": "name_of_local_measure"
883883
},
884-
"eau pour humains: nom de mesure locale:.": {
884+
"eau pour humains: nom de mesure locale:.": {
885885
"is_start": true,
886886
"product_id": "eau pour humains",
887-
"attribute": "name_of_local_measure",
888-
"strategy_type": "FoodPurchase"
887+
"attribute": "name_of_local_measure"
889888
},
890889
"eau pour betail: nom de la mesure locale": {
891890
"is_start": true,
892891
"product_id": "eau pour betail",
893-
"attribute": "name_of_local_measure",
894-
"strategy_type": "FoodPurchase"
892+
"attribute": "name_of_local_measure"
895893
},
896894
"farine de ble - nom de la mesure locale": {
897895
"is_start": true,
898896
"product_id": "farine de ble",
899-
"attribute": "name_of_local_measure",
900-
"strategy_type": "FoodPurchase"
897+
"attribute": "name_of_local_measure"
901898
}
902899
}

0 commit comments

Comments
 (0)