From cfbb11c218231dc04abd1056c99044ae6af04418 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Thu, 10 Aug 2023 12:06:57 -0700 Subject: [PATCH] Add more fields to gdrive (#285) Signed-off-by: Merwane Hamadi --- send_to_googledrive.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/send_to_googledrive.py b/send_to_googledrive.py index 5ffe8dd7..f4419526 100644 --- a/send_to_googledrive.py +++ b/send_to_googledrive.py @@ -39,6 +39,12 @@ def process_test( parts = test_name.split("_", 1) # Split by underscore only once test_suite = parts[0] if len(parts) > 1 else None + # transform array into string with | as separator + separator = "|" + categories = separator.join( + test_info.get("category", []), + ) + row = { "Agent": agent_name, "Command": common_data.get("command", ""), @@ -64,6 +70,12 @@ def process_test( "Cost": test_info.get("metrics", {}).get("cost", ""), "Attempted": test_info.get("metrics", {}).get("attempted", ""), "Test Suite": test_suite, + "Category": categories, + "Task": test_info.get("task", ""), + "Answer": test_info.get("answer", ""), + "Description": test_info.get("description", ""), + "Fail Reason": test_info.get("metrics", {}).get("fail_reason", ""), + "Reached Cutoff": test_info.get("reached_cutoff", ""), } rows.append(row)