Skip to content

Commit 3885dde

Browse files
Merge pull request #303 from sourcery-ai/new-readme-nov-2022
Update README.md
2 parents 259cb6d + 2199636 commit 3885dde

File tree

1 file changed

+58
-12
lines changed

1 file changed

+58
-12
lines changed

README.md

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,78 @@
22

33

44
## Sourcery
5-
Refactor Python instantly and keep your codebase maintainable.
5+
Instantly review and improve your Python code to keep your codebase maintainable.
66

7-
## GitHub Code Reviews
7+
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
8+
9+
## CLI
10+
11+
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.
12+
13+
To start `pip install sourcery-cli`, login with `sourcery login`, and then run `sourcery review <some path>` to have Sourcery review and make suggestions on every file in that path
14+
15+
## CI & Pre-Commit
16+
17+
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/).
18+
19+
For CI we recommend using
20+
21+
```yaml
22+
pip install sourcery-cli
23+
# Store your Sourcery token as a secret in your CI environment.
24+
sourcery login --token $SOURCERY_TOKEN
25+
sourcery review --check --diff "git diff main" .
26+
```
27+
28+
Or if it’s easier you can [check out our GitHub Action](https://github.com/marketplace/actions/sourcery-action)!
829

9-
Ensure your code is always at the highest quality. Sourcery refactors your whole repo on installation and every Pull Request thereafter.
30+
To set up your pre-commit hooks use:
1031

11-
Up and running in 1 minute. Just follow this [link](https://github.com/apps/sourcery-ai/installations/new) and select your repos.
32+
```yaml
33+
repos:
34+
- repo: https://github.com/sourcery-ai/sourcery
35+
rev: v0.13.0
36+
hooks:
37+
- id: sourcery
38+
# The best way to use Sourcery in a pre-commit hook:
39+
# * review only changed lines:
40+
# * omit the summary
41+
args: [--diff=git diff HEAD, --no-summary]
42+
```
1243
13-
Or for an instant demo, ⭐ this repo, and Sourcery will refactor your most popular Python repo and send you a pull request. As an added bonus **@sourcery-ai-bot** will ⭐ your repo too.
44+
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.
1445
1546
## IDE Integration
16-
Sourcery integrates into your editor to refactor your code as you write it.
47+
48+
Sourcery integrates into your editor to review and improve your code while you’re writing it
1749
1850
Find quick installation instructions here:
19-
- [PyCharm](https://sourcery.ai/download/?editor=pycharm)
20-
- [VS Code](https://sourcery.ai/download/?editor=vscode)
51+
52+
- [PyCharm](https://docs.sourcery.ai/Guides/Getting-Started/PyCharm/)
53+
- [VS Code](https://docs.sourcery.ai/Guides/Getting-Started/VSCode/)
54+
- [Sublime](https://docs.sourcery.ai/Guides/Getting-Started/Sublime/)
55+
- [Vim](https://docs.sourcery.ai/Guides/Getting-Started/Vim/)
2156
2257
More editor integrations coming soon.
2358
24-
### Demo
59+
## GitHub Code Reviews
60+
61+
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
62+
63+
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.
64+
65+
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.
66+
67+
## Demo
2568
2669
![Sourcery demo](sourcery-demo.gif)
2770
28-
## Links
29-
- [Docs](https://docs.sourcery.ai)
30-
- [Sourcery website](https://sourcery.ai)
71+
## **Links**
72+
73+
- [Docs](https://docs.sourcery.ai/)
74+
- [Sourcery website](https://sourcery.ai/)
75+
- [VS Code Plugin](https://marketplace.visualstudio.com/items?itemName=sourcery.sourcery&ssr=false#overview)
76+
- [PyCharm Plugin](https://plugins.jetbrains.com/plugin/12631-sourcery)
3177
3278
## Badges
3379
Let the world know your project is using Sourcery to refactor with this badge:

0 commit comments

Comments
 (0)