-
Notifications
You must be signed in to change notification settings - Fork 77
GitHub
If this is your first time using Sourcery you'll need to set up a Sourcery account. You can create an account with your GitHub account, Google account, or your email address.
You can install the Sourcery GitHub app directly using this link:
https://github.com/apps/sourcery-ai/installations/new
Sourcery automatically reviews any new PRs made to your repo and will give suggestions on how you can improve your code. Sourcery will only review the changes made in the PR, not your full code base.
To have Sourcery review your whole repository:
- Open up your Sourcery Dashboard
- Select your repo (or add new repos)
- Click the Refactor button
In GitHub you can accept all of Sourcery's suggestions by merging the PR
To add Sourcery to new repos:
- Open up your Sourcery Dashboard
- Click the Add Repo button
- Select the repo you want to add
We know there might be files or paths you don't want Sourcery to refactor - especially things like third party libraries. If you want Sourcery to ignore these you can add a file or a path to the ignore section in the .sourcery.yaml
file in your project directory like this:
```
ignore:
- data/*
- .venv/*
- '*_test.py' # Note that any strings beginning with * must be quoted
```
Sourcery provides quality metrics on every Sourcery PR. Scroll to the bottom of the pull request to see Sourcery's metrics across four different areas:
- Complexity
- Method Length
- Working Memory
- Overall Quality
Please visit our newer docs at https://docs.sourcery.ai