SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Track vscode test settings
Kilian Lieretff50124354eb
diff --git a/.vscode/launch.json b/.vscode/launch.jsonnew file mode 100644index 00000000..5f792643--- /dev/null+++ b/.vscode/launch.json@@ -0,0 +1,16 @@+{+ "configurations": [+ {+ "name": "Python: Debug Tests",+ "type": "debugpy",+ "request": "launch",+ "program": "${file}",+ "purpose": ["debug-test"],+ "console": "integratedTerminal",+ "env": {+ "PYTEST_ADDOPTS": "--no-cov"+ },+ "justMyCode": false+ }+ ]+}diff --git a/.vscode/settings.json b/.vscode/settings.jsonnew file mode 100644index 00000000..ccda75a6--- /dev/null+++ b/.vscode/settings.json@@ -0,0 +1,10 @@+{+ "python.testing.pytestArgs": [+ "--cov=sweagent/",+ // "--cov-report=xml",+ "tests"+ ],+ "python.testing.unittestEnabled": false,+ "python.testing.pytestEnabled": true,+ "git.ignoreLimitWarning": true+}\ No newline at end of filediff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex ab4df1d4..51b7ba26 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -72,7 +72,6 @@ class AgentConfig(BaseModel):model_config = ConfigDict(extra="forbid")-# todo: Move parse function to tools# todo: separate out from_config. In particular separate out model (as a class, etc.). Agent should only take templates, tools, history processor and model.# slight problem: get_model needs commands....class Agent:@@ -175,7 +174,7 @@ class Agent:self._chook.on_query_message_added(**item)self.history.append(item)- # todo: klieret: Long term: Might make more sense to reinitialize the agent class for every instance instead of this+ # todo: get rid of this. simply instantiate a new agent class for every instance?def setup(self, init_model_stats: APIStats | None = None) -> None:"""Setup the agent for a new instance. This includesformatting the system message and adding demonstrations to the history.@@ -657,7 +656,7 @@ class Agent:self._chook.on_step_done(trajectory_step=trajectory_step, model_stats=model_stats)return observation, done- # todo: Set env already in setup?+ # todo: Set env already in __init__, i.e., initialize a new agent class for every instance?def run(self,problem_statement: ProblemStatement | ProblemStatementConfig,