diff --git a/gcf_data_mapper/parsers/family.py b/gcf_data_mapper/parsers/family.py index 7b313a8..a06168c 100644 --- a/gcf_data_mapper/parsers/family.py +++ b/gcf_data_mapper/parsers/family.py @@ -140,14 +140,14 @@ def map_family_metadata(row: pd.Series) -> Optional[dict]: metadata = { "approved_ref": [row.at[FamilyColumnsNames.APPROVED_REF.value]], - "implementing_agencies": list(set(implementing_agencies)), + "implementing_agency": list(set(implementing_agencies)), "project_id": [row.at[FamilyColumnsNames.PROJECTS_ID.value]], "project_url": [row.at[FamilyColumnsNames.PROJECT_URL.value]], "project_value_fund_spend": gcf_budgets, "project_value_co_financing": co_financing_budgets, - "regions": list(set(regions)), - "result_areas": list(set(areas)), - "result_types": list(set(types)), + "region": list(set(regions)), + "result_area": list(set(areas)), + "result_type": list(set(types)), "sector": [row.at[FamilyColumnsNames.SECTOR.value]], "status": [status], "theme": [row.at[FamilyColumnsNames.THEME.value]], diff --git a/pyproject.toml b/pyproject.toml index 14210e6..332d46a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gcf-data-mapper" -version = "0.1.12" +version = "0.1.13" description = "A CLI tool to wrangle GCF data into format recognised by the bulk-import tool." authors = ["CPR-dev-team "] license = "Apache-2.0" diff --git a/tests/unit_tests/parsers/family/test_map_family.py b/tests/unit_tests/parsers/family/test_map_family.py index 2d16bd7..13d9f0e 100644 --- a/tests/unit_tests/parsers/family/test_map_family.py +++ b/tests/unit_tests/parsers/family/test_map_family.py @@ -15,14 +15,14 @@ def parsed_family_data(): "import_id": "GCF.family.FP003.12660", "metadata": { "approved_ref": ["FP003"], - "implementing_agencies": ["Green Innovations"], + "implementing_agency": ["Green Innovations"], "project_id": [12660], "project_url": ["https://www.climateaction.fund/project/FP003"], "project_value_fund_spend": [9200000], "project_value_co_financing": [620000], - "regions": ["Asia"], - "result_areas": ["Coastal protection and restoration"], - "result_types": ["Adaptation"], + "region": ["Asia"], + "result_area": ["Coastal protection and restoration"], + "result_type": ["Adaptation"], "sector": ["Environment"], "status": ["Under Implementation"], "theme": ["Adaptation"], diff --git a/tests/unit_tests/parsers/family/test_map_family_metadata.py b/tests/unit_tests/parsers/family/test_map_family_metadata.py index 36c21ea..6f09dec 100644 --- a/tests/unit_tests/parsers/family/test_map_family_metadata.py +++ b/tests/unit_tests/parsers/family/test_map_family_metadata.py @@ -16,14 +16,14 @@ def parsed_family_metadata(): return { "approved_ref": ["FP004"], - "implementing_agencies": ["Climate Action Innovations"], + "implementing_agency": ["Climate Action Innovations"], "project_id": [1], "project_url": ["https://www.climateaction.fund/project/FP004"], "project_value_co_financing": [620000], "project_value_fund_spend": [82000], - "regions": ["Latin America and the Caribbean"], - "result_areas": ["The Area for the Result Area"], - "result_types": ["The Type for the Result Area"], + "region": ["Latin America and the Caribbean"], + "result_area": ["The Area for the Result Area"], + "result_type": ["The Type for the Result Area"], "sector": ["Private"], "status": ["Under Implementation"], "theme": ["Adaptation"],