diff --git a/README.md b/README.md index e1ca6e4..1932a43 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,43 @@ [![Sourcery](https://img.shields.io/badge/Sourcery-enabled-brightgreen)](https://sourcery.ai) -## Sourcery -Instantly review and improve your Python code to keep your codebase maintainable. +## Sourcery - Instant AI Code Reviews -Get started with our CLI to have Sourcery review all your code locally or star this repo to have our GitHub bot review your most popular Python repo. +Sourcery is here to help you: +- Speed up your code review process +- Improve your code quality and ensure high quality code +- Spend less time on reviews +- Accelerate development velocity -## CLI +## What is Sourcery -You can have Sourcery review your entire project and make dozens or hundreds (or thousands) of improvements with a single command from the command line. +Sourcery is an automated code reviewer that will review any pull request on any GitHub repository to provide instant feedback on the proposed changes. -To start `pip install sourcery`, login with `sourcery login`, and then run `sourcery review ` to have Sourcery review and make suggestions on every file in that path. +Every review will include a summary of the changes, high level feedback, and line by line suggestions/comments (where relevant). -## CI & Pre-Commit +Our goal is to provide you with the type of code review you would expect to get from a colleague. We're not there yet, but we're continually working to get our reviews closer to that point. -Keep your entire codebase standardized with Sourcery’s [CI integration](https://docs.sourcery.ai/Guides/Getting-Started/CI/) and [pre-commit hook](https://docs.sourcery.ai/Guides/Getting-Started/Pre-Commit/). +## Getting Started +[Add Sourcery](https://github.com/apps/sourcery-ai/installations/new) to any repo to start seeing reviews on your new pull requests. -For CI we recommend using: +Sourcery is completely free to use for public repos/open source projects. -```yaml -pip install sourcery -# Store your Sourcery token as a secret in your CI environment. -sourcery login --token $SOURCERY_TOKEN -sourcery review --check --diff "git diff main" . -``` +For private repos you can try Sourcery for free for 14 days, but need a [Team or Pro plan](https://docs.sourcery.ai/Product/Plans/) after your trial ends. -Or if it’s easier you can [check out our GitHub Action](https://github.com/marketplace/actions/sourcery-action)! +## Privacy & Security +We use both OpenAI and Anthropic LLMs to provide pieces of our code reviews. Because of this, we need to send them sections of your code (typically the diff of the PR). -To set up your pre-commit hooks use: +However, none of your code is stored by us or by any third party for more than 30 days and none of your code is used to train any AI models. -```yaml -repos: - - repo: https://github.com/sourcery-ai/sourcery - rev: v1.15.0 - hooks: - - id: sourcery - # The best way to use Sourcery in a pre-commit hook: - # * review only changed lines: - # * omit the summary - args: [--diff=git diff HEAD, --no-summary] -``` -Note: Sourcery is fully free for open-source projects - but you need a [Team plan](https://docs.sourcery.ai/Product/Plans/) to use Sourcery in CI or as a pre-commit hook for private projects. +## IDE Coding Assistant -## IDE Integration +In addition to code reviews, you can use Sourcery as an automated pair programmer in your IDE. -Sourcery integrates into your editor to review and improve your code while you’re writing it. +Sourcery can help you: +- Understand existing code (whether you wrote it yesterday or someone else wrote it years ago) +- Add unit tests and docstrings to your code +- Optimize code for readability or performance +- Improve your code quality with instant suggestions Find quick installation instructions here: @@ -55,25 +48,18 @@ Find quick installation instructions here: More editor integrations coming soon. -## GitHub Code Reviews +## Feedback -Ensure your code is always at the highest quality. Sourcery reviews and makes suggestions on your whole repo when you install and then checks all new pull requests in the future. - -You can get set up and running in 1 minute. Just follow this [link](https://github.com/apps/sourcery-ai/installations/new) and select your repos. - -Or to try it out right away, ⭐ this repo, and Sourcery will review your most popular Python repo and send you a pull request. As an added bonus **@sourcery-ai-bot** will ⭐ your repo too. - -## Demo - -![Sourcery demo](sourcery-demo.gif) +We're always trying to learn how we can make Sourcery better. Let us know any thoughts you have by emailing hello@sourcery.ai ## **Links** -- [Docs](https://docs.sourcery.ai/) - [Sourcery website](https://sourcery.ai/) - [VS Code Plugin](https://marketplace.visualstudio.com/items?itemName=sourcery.sourcery&ssr=false#overview) - [PyCharm Plugin](https://plugins.jetbrains.com/plugin/12631-sourcery) + + ## Badges Let the world know your project is using Sourcery to refactor with this badge: