Skip to content

Commit fc9e7d7

Browse files
committed
Make the - sales part optional from regex as per HEA-1009
1 parent f5c5b92 commit fc9e7d7

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

pipelines/assets/livelihood_activity_regexes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@
476476
"percentage_sold_slaughtered"
477477
],
478478
[
479-
"{product_pattern} sales{separator_pattern} {nbr_pattern} sold",
479+
"{product_pattern}(?: sales)?{separator_pattern} {nbr_pattern} sold",
480480
"LivestockSale",
481481
true,
482482
"quantity_sold"

pipelines_tests/test_assets/test_livelihood_activity_regexes.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,24 @@
145145
"product_id": "cattle",
146146
"attribute": "quantity_sold"
147147
},
148+
"cattle sales - local: no. sold": {
149+
"strategy_type": "LivestockSale",
150+
"is_start": true,
151+
"product_id": "cattle sales - local",
152+
"attribute": "quantity_sold"
153+
},
154+
"goat sales - local: no. sold": {
155+
"strategy_type": "LivestockSale",
156+
"is_start": true,
157+
"product_id": "goat sales - local",
158+
"attribute": "quantity_sold"
159+
},
160+
"pig sales - local: no. sold": {
161+
"strategy_type": "LivestockSale",
162+
"is_start": true,
163+
"product_id": "pig sales - local",
164+
"attribute": "quantity_sold"
165+
},
148166
"cattle offtake (% sold/slaughtered)": {
149167
"product_id": "cattle",
150168
"attribute": "percentage_sold_slaughtered"

0 commit comments

Comments
 (0)