From 28566ef37e560882e929f0ddf8da2408affb166c Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 14 May 2025 21:24:25 +0200 Subject: [PATCH] implement submission injection --- src/utils/process_data.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/utils/process_data.py b/src/utils/process_data.py index b7893ad..bcddd3d 100644 --- a/src/utils/process_data.py +++ b/src/utils/process_data.py @@ -1,3 +1,4 @@ +import os import sys, docker from utils.handlers import get_build_handler from .paths import get_project_path @@ -59,6 +60,16 @@ def evaluate_refinement(answers: dict[str, dict[str, str]], percent_cb): ) continue + for file_path, change in changes.items(): + full_path = os.path.join(build_handler.path, file_path) + print("[INFO] Writing change to file:", full_path) + dirname = os.path.dirname(full_path) + if not os.path.exists(dirname): + print("[INFO] Creating directory:", dirname) + os.makedirs(dirname) + with open(full_path, "w") as f: + f.write(change) + results[id] = {} with build_handler: steps = [