diff --git a/gcf_data_mapper/enums/document.py b/gcf_data_mapper/enums/document.py index f428aac..e889796 100644 --- a/gcf_data_mapper/enums/document.py +++ b/gcf_data_mapper/enums/document.py @@ -30,5 +30,5 @@ class IgnoreDocumentTypes(Enum): class DocumentVariantNames(Enum): - ORIGINAL = "Original Translation" - TRANSLATION = "Translated" + ORIGINAL = "Original Language" + TRANSLATION = "Translation" diff --git a/gcf_data_mapper/parsers/document.py b/gcf_data_mapper/parsers/document.py index e4eca69..0b31152 100644 --- a/gcf_data_mapper/parsers/document.py +++ b/gcf_data_mapper/parsers/document.py @@ -127,7 +127,7 @@ def map_document_metadata( return { "import_id": f"GCF.document.{approved_ref}_{projects_id}.{doc_id}", "family_import_id": f"GCF.family.{approved_ref}.{projects_id}", - "metadata": {"type": doc_type}, + "metadata": {"type": [doc_type]}, "title": title, "source_url": source_url.strip(), "variant_name": variant_name, diff --git a/gcf_data_mapper/parsers/event.py b/gcf_data_mapper/parsers/event.py index 8cf98cf..2b4cd5c 100644 --- a/gcf_data_mapper/parsers/event.py +++ b/gcf_data_mapper/parsers/event.py @@ -32,7 +32,7 @@ def append_event( gcf_events.append( { "import_id": f"GCF.event.{approved_ref}_{projects_id}.n{n_value:04}", - "family_import_id": f"GCF.event.{approved_ref}.{projects_id}", + "family_import_id": f"GCF.family.{approved_ref}.{projects_id}", "event_title": event.type, "date": row[event.column_name], "event_type_value": event.type, diff --git a/gcf_data_mapper/parsers/family.py b/gcf_data_mapper/parsers/family.py index 6535364..7b313a8 100644 --- a/gcf_data_mapper/parsers/family.py +++ b/gcf_data_mapper/parsers/family.py @@ -149,7 +149,7 @@ def map_family_metadata(row: pd.Series) -> Optional[dict]: "result_areas": list(set(areas)), "result_types": list(set(types)), "sector": [row.at[FamilyColumnsNames.SECTOR.value]], - "status": status, + "status": [status], "theme": [row.at[FamilyColumnsNames.THEME.value]], } @@ -192,7 +192,7 @@ def map_family_data( # For now we are hard coding the category as MCF "category": "MCF", "collections": [], - "description": summary, + "summary": summary, "geographies": geographies, "import_id": import_id, "metadata": family_metadata, diff --git a/tests/unit_tests/parsers/family/test_map_family.py b/tests/unit_tests/parsers/family/test_map_family.py index e9f20a9..2d16bd7 100644 --- a/tests/unit_tests/parsers/family/test_map_family.py +++ b/tests/unit_tests/parsers/family/test_map_family.py @@ -10,7 +10,7 @@ def parsed_family_data(): { "category": "MCF", "collections": [], - "description": "The Summary of the Project", + "summary": "The Summary of the Project", "geographies": ["BGD"], "import_id": "GCF.family.FP003.12660", "metadata": { @@ -24,7 +24,7 @@ def parsed_family_data(): "result_areas": ["Coastal protection and restoration"], "result_types": ["Adaptation"], "sector": ["Environment"], - "status": "Under Implementation", + "status": ["Under Implementation"], "theme": ["Adaptation"], }, "title": "Enhancing resilience of coastal ecosystems and communities", 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 a29a56d..36c21ea 100644 --- a/tests/unit_tests/parsers/family/test_map_family_metadata.py +++ b/tests/unit_tests/parsers/family/test_map_family_metadata.py @@ -25,7 +25,7 @@ def parsed_family_metadata(): "result_areas": ["The Area for the Result Area"], "result_types": ["The Type for the Result Area"], "sector": ["Private"], - "status": "Under Implementation", + "status": ["Under Implementation"], "theme": ["Adaptation"], }