sweepai / sweep

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

Sweep: Refactor on_ticket.py to be more modular. #2606

Open wwzeng1 opened 7 months ago

wwzeng1 commented 7 months ago

Details

No response

Checklist - [X] Refactor `sweepai/handlers/on_ticket.py` ✓ https://github.com/sweepai/sweep/commit/e2533cab009f58b149b7cb2ff26d9f8e990b2fc1 - [X] Modify `sweepai/handlers/on_ticket.py` ✓ https://github.com/sweepai/sweep/commit/83dfef50b6b0881c255653cb4f27449bb09a8917 - [X] Test `sweepai/handlers/on_ticket_utils_test.py` ✗ ![Flowchart](http://24.199.78.105:8082/public/43292315d08c20e7ffbe9e5f87c738a4c59c6530e6a581590f32cefde124f9e7_2606_flowchart.svg)
sweep-nightly[bot] commented 7 months ago

Here's the PR! https://github.com/sweepai/sweep/pull/2611.

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

Actions (click)

Sandbox Execution ✓

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

Sandbox logs for 81c3ac4
git add . && pre-commit run --files sweepai/handlers/on_ticket.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/handlers/on_ticket.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/handlers/on_ticket.py; else exit 0; fi 2/6 ✓
(nothing was outputted)
if [[ "sweepai/handlers/on_ticket.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/handlers/on_ticket.py; else exit 0; fi 3/6 ✓
2023-11-19 02:20:40.838 | INFO     | sweepai.config.server::197 - No Sandbox URL found.
git add . && pre-commit run --files sweepai/handlers/on_ticket.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/handlers/on_ticket.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only sweepai/handlers/on_ticket.py; else exit 0; fi 5/6 ✓
(nothing was outputted)
if [[ "sweepai/handlers/on_ticket.py" == *.py ]]; then PYTHONPATH=. poetry run python sweepai/handlers/on_ticket.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/81c3ac419670188fbd9bc400590cb8e589596297/sweepai/handlers/on_ticket.py#L948-L1028

Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/on_ticket_modularity_7.


🎉 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