sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.45k stars 427 forks source link

Sweep: Refactor modify_bot.py to be more modular. #2586

Open wwzeng1 opened 12 months ago

wwzeng1 commented 12 months ago

Details

No response

Checklist - [X] Refactor `sweepai/agents/modify_bot.py` ✓ https://github.com/sweepai/sweep/commit/1cbfbb1a61ae0fe5308de3de9c9dc83f38ec75bc - [X] Modify `sweepai/agents/modify_bot.py` ! No changes made - [ ] Test `sweepai/agents/modify_bot_test.py` ⋯ ![Flowchart](http://24.199.78.105:8082/public/695388fd23d155e1688cbed7300b876e33d2c5f712882b48ce45e4cfe660d7ec_2586_flowchart.svg)
sweep-nightly[bot] commented 12 months ago
Sweeping

50%
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: e2a8480f28)

![Docker Version Updated](https://img.shields.io/badge/Docker%20Version%20Updated-7%20minutes%20ago-blue)

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for a1d99aa
git add . && pre-commit run --files sweepai/agents/modify_bot.py || exit 0 1/6 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/agents/modify_bot.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/agents/modify_bot.py; else exit 0; fi 2/6 ✓
(nothing was outputted)
if [[ "sweepai/agents/modify_bot.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/agents/modify_bot.py; else exit 0; fi 3/6 ✓
2023-11-16 06:49:29.438 | INFO     | sweepai.config.server::197 - No Sandbox URL found.
git add . && pre-commit run --files sweepai/agents/modify_bot.py || exit 0 4/6 ✓
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
black....................................................................Passed
isort....................................................................Passed
autoflake................................................................Passed
if [[ "sweepai/agents/modify_bot.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/agents/modify_bot.py; else exit 0; fi 5/6 ✓
(nothing was outputted)
if [[ "sweepai/agents/modify_bot.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/agents/modify_bot.py; else exit 0; fi 6/6 ✓
(nothing was outputted)

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/a1d99aa036af4ec78c476164fa7f436e2e2b3500/sweepai/agents/modify_bot.py#L162-L330 https://github.com/sweepai/sweep/blob/a1d99aa036af4ec78c476164fa7f436e2e2b3500/sweepai/agents/move_bot.py#L80-L148 https://github.com/sweepai/sweep/blob/a1d99aa036af4ec78c476164fa7f436e2e2b3500/sweepai/agents/refactor_bot_test.py#L1-L35

Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

Working on it...


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord