From 956bc1165a3ce664713fef282dcf8e1fccdf8a9c Mon Sep 17 00:00:00 2001 From: Senko Rasic Date: Wed, 13 Dec 2023 18:34:06 +0100 Subject: [PATCH 1/2] Only send text files to the LLM --- pilot/helpers/Project.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pilot/helpers/Project.py b/pilot/helpers/Project.py index 545f75386..92b416379 100644 --- a/pilot/helpers/Project.py +++ b/pilot/helpers/Project.py @@ -198,6 +198,11 @@ def get_all_coded_files(self): files = self.get_files([file.path + '/' + file.name for file in files]) + # Don't send contents of binary files + for file in files: + if not isinstance(file["content"], str): + file["content"] = f"<>" + # TODO temoprary fix to eliminate files that are not in the project files = [file for file in files if file['content'] != ''] # TODO END From a7c1bb81fbf8a3f60d373e6fff13fb2f28ede194 Mon Sep 17 00:00:00 2001 From: Senko Rasic Date: Mon, 18 Dec 2023 18:10:30 +0100 Subject: [PATCH 2/2] xfail process known to sometimes fail because it finds a random PID --- pilot/helpers/test_cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pilot/helpers/test_cli.py b/pilot/helpers/test_cli.py index 4ce452d68..a5fe6736e 100644 --- a/pilot/helpers/test_cli.py +++ b/pilot/helpers/test_cli.py @@ -1,9 +1,12 @@ import platform from unittest.mock import patch, MagicMock, call +import pytest + from helpers.cli import execute_command, terminate_process, run_command_until_success from helpers.test_Project import create_project +@pytest.mark.xfail() @patch("helpers.cli.os") @patch("helpers.cli.subprocess") def test_terminate_process_not_running(mock_subprocess, mock_os):