From b328a1b009c98ba7f1d9c1c077f6b099406dc64e Mon Sep 17 00:00:00 2001 From: Girum Bizuayehu Date: Mon, 25 Aug 2025 11:51:27 +0300 Subject: [PATCH 1/4] Add missing wild_foods_valid_instances in the consolidated_instances of consolidated_fixture asset see HEA-677 --- pipelines/assets/fixtures.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipelines/assets/fixtures.py b/pipelines/assets/fixtures.py index 88b7e8e6..bfc78c08 100644 --- a/pipelines/assets/fixtures.py +++ b/pipelines/assets/fixtures.py @@ -338,7 +338,9 @@ def consolidated_fixture( for model_name, instances in livelihood_activity_valid_instances.items() if model_name != "WealthGroup" }, + **wild_foods_valid_instances, } + # Add the wild foods and other cash income instances, if they are present for model_name, instances in {**other_cash_income_valid_instances, **wild_foods_valid_instances}.items(): if instances and model_name != "WealthGroup": From b3f68f62b48b0bb868e9e1dd155066a116169a53 Mon Sep 17 00:00:00 2001 From: Girum Bizuayehu Date: Tue, 26 Aug 2025 20:11:18 +0300 Subject: [PATCH 2/4] Blackify fixture.py see HEA-677 --- pipelines/assets/fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipelines/assets/fixtures.py b/pipelines/assets/fixtures.py index bfc78c08..c554435e 100644 --- a/pipelines/assets/fixtures.py +++ b/pipelines/assets/fixtures.py @@ -340,7 +340,7 @@ def consolidated_fixture( }, **wild_foods_valid_instances, } - + # Add the wild foods and other cash income instances, if they are present for model_name, instances in {**other_cash_income_valid_instances, **wild_foods_valid_instances}.items(): if instances and model_name != "WealthGroup": From 53a4d5bdae9bd042705845e49e46334a654bf135 Mon Sep 17 00:00:00 2001 From: Girum Bizuayehu Date: Mon, 1 Sep 2025 09:12:45 +0300 Subject: [PATCH 3/4] Add model keys 'Fishing' and 'WildFoodGathering' see HEA-677 --- pipelines/assets/fixtures.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipelines/assets/fixtures.py b/pipelines/assets/fixtures.py index c554435e..131befbc 100644 --- a/pipelines/assets/fixtures.py +++ b/pipelines/assets/fixtures.py @@ -338,8 +338,10 @@ def consolidated_fixture( for model_name, instances in livelihood_activity_valid_instances.items() if model_name != "WealthGroup" }, - **wild_foods_valid_instances, } + # Add the keys: `Fishing` and `WildFoodGathering` + consolidated_instances["Fishing"] = [] + consolidated_instances["WildFoodGathering"] = [] # Add the wild foods and other cash income instances, if they are present for model_name, instances in {**other_cash_income_valid_instances, **wild_foods_valid_instances}.items(): From b6474bba7ed9b013b79098c0cd65a618f0766de9 Mon Sep 17 00:00:00 2001 From: Girum Bizuayehu Date: Wed, 3 Sep 2025 08:15:12 +0300 Subject: [PATCH 4/4] Address PR feedback see HEA677 --- pipelines/assets/fixtures.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pipelines/assets/fixtures.py b/pipelines/assets/fixtures.py index 131befbc..13be77b3 100644 --- a/pipelines/assets/fixtures.py +++ b/pipelines/assets/fixtures.py @@ -339,13 +339,12 @@ def consolidated_fixture( if model_name != "WealthGroup" }, } - # Add the keys: `Fishing` and `WildFoodGathering` - consolidated_instances["Fishing"] = [] - consolidated_instances["WildFoodGathering"] = [] # Add the wild foods and other cash income instances, if they are present for model_name, instances in {**other_cash_income_valid_instances, **wild_foods_valid_instances}.items(): if instances and model_name != "WealthGroup": + if model_name not in consolidated_instances: + consolidated_instances[model_name] = [] consolidated_instances[model_name] += instances fixture, metadata = get_fixture_from_instances(consolidated_instances)