From 6d6839dcd498ef35e2e1e98bc1a29ee879e73617 Mon Sep 17 00:00:00 2001 From: Alex Galarce Date: Tue, 25 Feb 2025 20:16:21 +0000 Subject: [PATCH] Merged in hotfix/code-description-handling (pull request #416) Hotfix/code description handling * Update date formatting in prompts to YYYY/MM/DD * fix tests for new date formatting * Enhance code parsing to support comma-separated values in get_code_description function * Merged main into hotfix/code-description-handling Approved-by: Katon Minhas --- fieldExtraction/src/investment/code_funcs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fieldExtraction/src/investment/code_funcs.py b/fieldExtraction/src/investment/code_funcs.py index 4a9db75..81d9b04 100644 --- a/fieldExtraction/src/investment/code_funcs.py +++ b/fieldExtraction/src/investment/code_funcs.py @@ -240,6 +240,10 @@ def get_code_description(code, code_mapping): return "N/A" elif "[" in code and "]" in code: code_list = ast.literal_eval(code) + elif "," in code: + code_list = code.split(",") + else: + code_list = [code] elif isinstance(code, list): code_list = code else: