🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
1. Dev compatible with windows path 2. add @pytest.mark.skip
mannaandpoemdcb0623d462b
diff --git a/metagpt/utils/dependency_file.py b/metagpt/utils/dependency_file.pyindex c8b3bc4a4..9ecead244 100644--- a/metagpt/utils/dependency_file.py+++ b/metagpt/utils/dependency_file.py@@ -96,7 +96,8 @@ class DependencyFile:key = Path(filename).relative_to(root)except ValueError:key = filename- return set(self._dependencies.get(str(key), {}))+ key = re.sub(r"\\+", "/", str(key))+ return set(self._dependencies.get(key, {}))def delete_file(self):"""Delete the dependency file."""diff --git a/tests/metagpt/test_incremental_dev.py b/tests/metagpt/test_incremental_dev.pyindex 964d4c757..92001a5d1 100644--- a/tests/metagpt/test_incremental_dev.py+++ b/tests/metagpt/test_incremental_dev.py@@ -45,6 +45,7 @@ PROJECT_NAMES = []def test_simple_add_calculator():result = get_incremental_dev_result(IDEAS[0], PROJECT_NAMES[0])log_and_check_result(result)@@ -115,8 +116,11 @@ def get_incremental_dev_result(idea, project_name, use_review=True):if not project_path.exists():# If the project does not exist, extract the project filetry:- # Use the tar command to extract the .zip file- subprocess.run(["tar", "-xf", f"{project_path}.zip", "-C", str(project_path.parent)], check=True)+ if os.name == "nt":+ subprocess.run(["tar", "-xf", f"{project_path}.zip", "-C", str(project_path.parent)], check=True)+ else:+ subprocess.run(["unzip", f"{project_path}.zip", "-d", str(project_path.parent)], check=True)+ logger.info(f"Extracted project {project_name} successfully.")except subprocess.CalledProcessError as e:# If the extraction fails, throw an exceptionraise Exception(f"Failed to extract project {project_name}. Error: {e}")