Skip to main content

Sweep fixes GitHub issues

Project description

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. :robot:

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!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sweepai-1.0.7.tar.gz (215.0 kB view details)

Uploaded Source

Built Distribution

sweepai-1.0.7-py3-none-any.whl (226.5 kB view details)

Uploaded Python 3

File details

Details for the file sweepai-1.0.7.tar.gz.

File metadata

  • Download URL: sweepai-1.0.7.tar.gz
  • Upload date:
  • Size: 215.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for sweepai-1.0.7.tar.gz
Algorithm Hash digest
SHA256 87891d29a995fc1c503e5b62a6ff43d7fe447063ef95476dfb336e9cbb683dff
MD5 df9aaf6523c29f54494338d1b6f4e8b2
BLAKE2b-256 51d63af68f02b8177e7ff006d2e754898ee5b3e9ee0f7b84914c03d7760061f4

See more details on using hashes here.

File details

Details for the file sweepai-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: sweepai-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 226.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for sweepai-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7a0414a5b0cce325520ce16e82f00879543027c7486e96db0a61da1aac594674
MD5 1b8a2e462f0f577868c230069e1d072c
BLAKE2b-256 47f851846a67c87c590a0f9dcac4c00c288de0f9596b5c08a27f951dbccda038

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page