CharlonTank / sweep

Sweep: AI-powered Junior Developer for small features and bug fixes.
https://sweep.dev
GNU Affero General Public License v3.0
0 stars 0 forks source link

Sweep: Enable Terminal Command Execution in Sweep #1

Open CharlonTank opened 9 months ago

CharlonTank commented 9 months ago

Details

Details:

I'm proposing an enhancement for Sweep to automate the entire development workflow, including steps that currently require manual terminal command execution. The goal is to extend Sweep's capabilities beyond its current limitations to include tasks like running migrations, code formatting, linting, and testing which are integral to Elm and Rails development workflows.

Current Limitation: Sweep automates many aspects of my Elm, Rails, and GraphQL workflow but stops short at terminal-based commands. This gap requires manual intervention or alternative tools, disrupting the automation flow.

Feature Request: Integrate terminal command execution within Sweep, enabling it to handle tasks such as:

Running and rolling back migrations Executing code formatters and linters Running test suites This feature would significantly enhance workflow automation, minimizing manual steps and maximizing efficiency.

Expected Outcome:

A more streamlined and fully automated development process. Reduced manual error and increased consistency across tasks. Enhanced productivity and focus on development rather than repetitive setup and teardown tasks. This capability would make Sweep a more comprehensive tool for developers, covering nearly the entire development lifecycle automatically.

Checklist - [X] Create `sweepai/utils/terminal_executor.py` ✓ https://github.com/CharlonTank/sweep/commit/4cb6e8e15e2ce1b9b1a05199341a03df56784d5b [Edit](https://github.com/CharlonTank/sweep/edit/sweep/enable_terminal_command_execution_in_swe/sweepai/utils/terminal_executor.py) - [X] Running GitHub Actions for `sweepai/utils/terminal_executor.py` ✓ [Edit](https://github.com/CharlonTank/sweep/edit/sweep/enable_terminal_command_execution_in_swe/sweepai/utils/terminal_executor.py) - [X] Modify `sweepai/api.py` ✓ https://github.com/CharlonTank/sweep/commit/00978b2f586a982aad605439a3842c7a0c062dd5 [Edit](https://github.com/CharlonTank/sweep/edit/sweep/enable_terminal_command_execution_in_swe/sweepai/api.py#L1-L1) - [X] Running GitHub Actions for `sweepai/api.py` ✓ [Edit](https://github.com/CharlonTank/sweep/edit/sweep/enable_terminal_command_execution_in_swe/sweepai/api.py#L1-L1)
CharlonTank commented 9 months ago

🚀 Here's the PR! #3

See Sweep's progress at the progress dashboard!
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: None)

[!TIP] I can email you next time I complete a pull request if you set up your email here!


Actions (click)

GitHub Actions✓

Here are the GitHub Actions logs prior to making any changes:

Sandbox logs for 8b6a9bd
Checking sweepai/api.py for syntax errors... ✅ sweepai/api.py has no syntax errors! 1/1 ✓
Checking sweepai/api.py for syntax errors...
✅ sweepai/api.py has no syntax errors!

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 think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/CharlonTank/sweep/blob/8b6a9bd764e6f10cfff76b87fd8926c4155f06fc/README.md#L35-L58 https://github.com/CharlonTank/sweep/blob/8b6a9bd764e6f10cfff76b87fd8926c4155f06fc/docs/pages/deployment.mdx.old#L27-L95 https://github.com/CharlonTank/sweep/blob/8b6a9bd764e6f10cfff76b87fd8926c4155f06fc/docs/pages/blogs/understanding-codebase-with-ctags.mdx#L1-L55 https://github.com/CharlonTank/sweep/blob/8b6a9bd764e6f10cfff76b87fd8926c4155f06fc/docs/pages/blogs/super-linter.mdx#L1-L41

Step 2: ⌨️ Coding

Ran GitHub Actions for 4cb6e8e15e2ce1b9b1a05199341a03df56784d5b:

--- 
+++ 
@@ -46,6 +46,7 @@
     GITHUB_LABEL_NAME,
     IS_SELF_HOSTED,
 )
+from sweepai.utils.terminal_executor import TerminalExecutor
 from sweepai.core.entities import PRChangeRequest
 from sweepai.events import (
     CheckRunCompleted,

Ran GitHub Actions for 00978b2f586a982aad605439a3842c7a0c062dd5:


Step 3: 🔁 Code Review

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


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description.Something wrong? Let us know.