Skip to content

Commit 3ce905c

Browse files
authored
Update readme to show sourcery in action and add social links (#30)
1 parent 7a99840 commit 3ce905c

File tree

1 file changed

+60
-22
lines changed

1 file changed

+60
-22
lines changed

README.md

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,76 @@
1-
# Sourcery VS Code Extension
1+
[twitter-shield]: https://img.shields.io/twitter/follow/SourceryAI?style=social
2+
[twitter-url]: https://bit.ly/sourceryai-twitter
3+
[github-shield]: https://img.shields.io/github/stars/sourcery-ai/sourcery?style=social
4+
[github-url]: https://bit.ly/sourceryai-github
5+
[vscode-shield]: https://img.shields.io/visual-studio-marketplace/r/sourcery.sourcery?logo=visual-studio-code&style=social
6+
[vscode-url]: https://bit.ly/sourceryai-vscode
27

3-
[Sourcery](https://sourcery.ai) is an AI-powered coding assistant which helps you write better Python code faster.
4-
It works by providing refactoring suggestions on the fly that you can instantly integrate into your code.
8+
[![Github Repo][github-shield]][github-url]
9+
[![VSCode Plugin][vscode-shield]][vscode-url]
10+
[![Twitter Follow][twitter-shield]][twitter-url]
511

6-
This extension is currently in beta - please raise any problems or feedback as issues.
12+
# Sourcery for VS Code
713

8-
## Installation
14+
Sourcery is your personal coding assistant that helps you write better, cleaner, Python code. It suggests refactorings on the fly to instantly improve your code.
915

10-
1. Open VS Code and press `Ctrl+P` (`Cmd+P` on Mac) then paste in `ext install sourcery.sourcery` and press `Enter`.
11-
2. Click [here](https://sourcery.ai/download/?editor=vscode) to get a free token and copy it to your clipboard.
12-
3. Search for `sourcery` in the VS Code settings and enter the token into the ```Sourcery Token``` field.
16+
![Sourcery in VS Code](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/master/assets/VS_Code_Refactorings.gif)
1317

14-
## How it works
18+
---
1519

16-
Sourcery scans the Python file that you have open in your editor. Refactoring suggestions are
17-
underlined and listed in the Problems window.
20+
### Using Sourcery
1821

19-
You can hover over a suggestion to see a diff of the changes.
22+
Sourcery runs in the background whenever you're working on Python files. Keep an eye out for sections of your code underlined in blue - that means Sourcery has a suggestion!
2023

21-
To implement the suggestion use the Quick Fix from either the Problems window or the lightbulb in the code editor.
24+
Hover over a Sourcery suggestion to see a description of what Sourcery wants you to change along with the diff of the proposed changes. Then either use the quickfix menu (`Ctrl+.` or `Cmd+.` for most people) or click on the lightbulb icon to bring up the Sourcery menu and choose to accept or reject the changes.
2225

23-
If you don't like the suggestion there is a quick fix to disable Sourcery for the function, or you can add
24-
```# sourcery off``` as a comment on that function.
26+
Sourcery also provides quality metrics for every function you write (plus warnings for really bad code).
2527

26-
## GitHub Integration
28+
![Quality Metrics](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/master/assets/Hover_Over_Metrics_VS_Code.gif)
2729

28-
Sourcery is also available as a Github bot that can automatically refactor pull requests on selected repositories.
29-
[Try it out now!](https://sourcery.ai/github/).
30+
---
3031

31-
## About us
32+
### Installation / Getting Started
3233

33-
Sourcery is built by a small team of two developers based in London. Our aim is to help everyone write brilliant code.
34-
Follow us on [Twitter](https://twitter.com/sourceryai) or visit our [blog](https://sourcery.ai/blog) to keep up with updates.
34+
- Navigate to the Extensions tab and search for the Sourcery extension
35+
- Click the Install button on the right-hand side
36+
- Once installed click [here](https://sourcery.ai/download/?editor=vscode) to get a free token and enter it into the provided dialog or straight into the Sourcery settings.
3537

36-
## Licensing
38+
### Sourcery Pro
39+
40+
Looking for an even bigger quality boost for your code?
41+
42+
*Automatic method extraction*
43+
44+
Sourcery can find duplicate code or coherent blocks that should be extracted into a method. It will then do the extraction for you - all you need to do is name the method!
45+
46+
![Extract Method](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/master/assets/Extract_Method_VS_Code_Demo.gif)
47+
48+
*Multi file analysis & Duplicate analysis (beta):*
49+
50+
Right click on any file or folder in the Explorer and hover over the Sourcery menu to see some of our more advanced features.
51+
52+
Choose "Scan with Sourcery" to have Sourcery analyse all of the files in that folder, not just your current folder.
53+
54+
![Scan for refactorings](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/master/assets/VS_Code_Scan_for_Refactorings.gif)
55+
56+
Or choose "Detect Clones" to have Sourcery scan for duplicate sections of code across those files.
57+
58+
![Detect duplicate code](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/master/assets/Duplicate_Code_Detection_VS_Code.gif)
59+
60+
---
61+
62+
### Privacy / Security
63+
64+
All of the analysis we do on your code is done fully locally. We never see any of your code or pass it back to our servers in any way. The only thing we collect is some basic analytics about the types of suggestions we make, and information about exceptions in Sourcery.
65+
66+
---
67+
68+
### About us
69+
70+
We're a small team out of London trying to make it easier for everyone to write brilliant code. Follow us on [Twitter](https://twitter.com/sourceryai) or visit our [blog](https://sourcery.ai/blog) to keep up with updates.
71+
72+
---
73+
74+
### Licensing
3775

3876
This repository includes source code as well as packaged binaries. The MIT license only applies to the source code, not the binaries.

0 commit comments

Comments
 (0)