Giter Site home page Giter Site logo

magaton / sweep Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sweepai/sweep

0.0 0.0 0.0 190.89 MB

Sweep: AI-powered Junior Developer for small features and bug fixes.

Home Page: https://sweep.dev

License: GNU Affero General Public License v3.0

Shell 1.05% JavaScript 0.37% Python 64.02% TypeScript 13.31% CSS 0.19% HTML 0.09% Jupyter Notebook 20.87% Dockerfile 0.10%

sweep's Introduction

Github Issues ⟢  Pull Requests!

Install Sweep Github App Docker Pulls Docs Better Stack Badge Self Host Sweep Docker Image Python Unit Tests


Sweep is an AI junior developer that turns bugs and feature requests into code changes. Sweep automatically handles devex improvements like adding typehints/improving test coverage. πŸ€–

Install Sweep and open a Github Issue like: Sweep: Add typehints to src/utils/github_utils.py and Sweep will:

  1. Search through your codebase to find the dependencies of github_utils.py
  2. Modify the code to add typehints
  3. Run and debug your code to write a Pull Request ⚑

Features

  • Turns issues directly into pull requests (without an IDE)
  • Addresses developer replies & comments on its PRs
  • Understands your codebase using the dependency graph, text, and vector search.
  • Runs your unit tests and autoformatters to validate generated code.
  • Stack small fixes into your PR by applying Sweep Rules

Sweep Youtube Tutorial

Note

What makes Sweep Different

We've been addressing code modification using LLMs for a while. We found and are fixing a lot of issues.

  • Modifying Code - LLMs like GPT4 don't have a great way to automatically modify code. We heavily experiment on different ways to modify code so you don't have to. We've spent a really long time working on this - check out https://docs.sweep.dev/blogs/gpt-4-modification!
  • Planning Code Changes - Retrieval-Augmented-Generation isn't enough. We wrote a code chunker that's used fairly heavily, and we're constantly improving this: https://docs.sweep.dev/blogs/chunking-improvements
  • Sweep runs your Github Actions, catching bugs and making sure each line of new code has been properly validated!
  • Sweep uses it's sandbox to format your code, and uses Rules to perform other changes like adding typehints, or any other small chores!

Getting Started

GitHub App

Install Sweep by adding the Sweep GitHub App to your desired repositories.

  • For more details, visit our installation page.

  • Note: Sweep only considers issues with the "Sweep:" title on creation and not on update. If you want Sweep to pick up an existing issue, you can add the "Sweep" label to the issue.

  • We focus on Python but support all languages GPT-4 can write. This includes JS/TS, Rust, Go, Java, C# and C++.

Self-Hosting

You can self-host Sweep with our Docker image (https://hub.docker.com/r/sweepai/sweep). Please check out our deployment instructions here! https://docs.sweep.dev/deployment

Development

Starting the Webhook

  1. Clone the repo with git clone https://github.com/sweepai/sweep.
  2. Create .env according to https://docs.sweep.dev/deployment.
  3. Run docker compose up --build. This will take a few moments to start.

To build our Docker images, run docker compose build.


Story

We used to work in large, messy repositories, and we noticed how complex the code could get without regular refactors and unit tests. We realized that AI could handle these chores for us, so we built Sweep!

Unlike existing AI solutions, Sweep can solve entire tickets and can be parallelized + asynchronous: developers can spin up 10 tickets and Sweep will address them all at once.

Highlights

Examine pull requests created by Sweep!

Pricing

Every user receives unlimited GPT-3.5 tickets and 5 GPT-4 tickets per month. For professionals who want to try unlimited GPT-4 tickets and priority support, you can get a one week free trial of Sweep Pro.

For more GPT-4 tickets visit our payment portal!

You can self-host Sweep's docker image on any machine (AWS, Azure, your laptop) for free. You can get enterprise support by contacting us.


Warning

Limitations of Sweep

  • Gigantic repos: >5000 files. We have default extensions and directories to exclude but sometimes this doesn't catch them all. You may need to block some directories (see blocked_dirs) * If Sweep is stuck at 0% for over 30 min and your repo has a few thousand files, let us know.
  • Large-scale refactors: >3 files or >150 lines of code changes * e.g. Refactor the entire codebase from TensorFlow to PyTorch * Sweep works best when pointed to a file, and we're continously improving Sweep's automation!
  • Editing images and other non-text assets * e.g. Use the logo to create favicons for our landing page

Contributing

Contributions are welcome and greatly appreciated! To get set up, see Development. For detailed guidelines on how to contribute, please see the CONTRIBUTING.md file.

Contributors

Thank you for your contribution!

and, of course, Sweep!

sweep's People

Contributors

kevinlu1248 avatar wwzeng1 avatar lukejagg avatar sweep-nightly[bot] avatar martinye1234 avatar asc11cat avatar onuratakan avatar noktoborus avatar 3mooth1e avatar sweep-ai[bot] avatar magaton avatar dependabot[bot] avatar eltociear avatar jodyz0203 avatar shobrook avatar jannkleen avatar masad-frost avatar ayan-joshi avatar amorriscode avatar filiphsps avatar freephoenix888 avatar krrishdholakia avatar swiecki avatar shibzhou avatar thebigbone avatar abelanger5 avatar tmsagarofficial avatar berg1618 avatar georgehe4 avatar effyyzhang avatar

sweep's Issues

Create process_issue_text method

sweep_cli.py accepts the issue text as an argument.
it calls:
files_to_change, execution_plan = process_issue_text(issue_text)

but this function is not implemented.
You need to implement this function that will return the fileset and execution plan

Checklist
  • Create sweepai/logic/process_issue.py βœ“ dfebc98 Edit
  • Running GitHub Actions for sweepai/logic/process_issue.py βœ“ Edit
  • Modify sweep_cli.py ! No changes made Edit
  • Running GitHub Actions for sweep_cli.py βœ— Edit

Complete the implementation process_issue.py

You havent completed implementation of sweepai/logic/process_issue.py in the last PR.
file set path is hardcoded:

 zip_path = "/tmp/dummy_path.zip"

Provide the code that creates this zip file.

Checklist
  • Modify sweepai/logic/process_issue.py ! No changes made Edit
  • Running GitHub Actions for sweepai/logic/process_issue.py βœ— Edit
  • Modify sweepai/agents/assistant_planning.py ! No changes made Edit
  • Running GitHub Actions for sweepai/agents/assistant_planning.py βœ— Edit

Change the way how sweep works

Your task is to change the way how sweep works:

  • it should not connect to the github to get the issue, instead, it should be a command line application (like sweep-cli) that receives the text of the issue as an cli argument.
  • all the git integration-related code should be removed
  • The result of the cli call should be:
    • the list of files that should be changed
    • a proposed execution plan

No PR should be created and no file modification should be done.
If you are not clear, ask the question

Checklist
  • Create sweep_cli.py βœ“ 00b0c96 Edit
  • Running GitHub Actions for sweep_cli.py βœ“ Edit
  • Modify docs/pages/usage/advanced.mdx βœ“ 43a85fa Edit
  • Running GitHub Actions for docs/pages/usage/advanced.mdx βœ“ Edit
  • Modify docs/pages/usage/config.mdx βœ“ f958efa Edit
  • Running GitHub Actions for docs/pages/usage/config.mdx βœ“ Edit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.