Skip to content

Commit

Permalink
updating marketplace info and walkthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
angrycaptain19 committed Sep 16, 2024
1 parent 2674980 commit 0786952
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 267 deletions.
11 changes: 11 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.10"
20 changes: 20 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 20 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ Sourcery is the pair programmer who will help you improve your code. It revie

## Sourcery

Sourcery is a VS Code extension to help make all of your code cleaner and more readable. Quickly find areas **where your code could be refactored**, see **instant suggestions for improvement**, and understand how new changes impact your **code quality**.
Sourcery is a VS Code extension to help you move faster and ship code with confidence. Sourcery gives you code reviews anytime you want, so you can get feedback before you need to open a PR. Plus Sourcery's coding assistant helps you speed up repetitive tasks while you work.

Here are some of the features Sourcery offers to help improve your code:

- [Code reviews anytime, in IDE](#code-reviews-on-demand)
- [GitHub & GitLab Pull Request reviews](#github-pull-request-review)
- [Real-time refactoring suggestions](#real-time-refactoring-suggestions)
- [Set up your own rules - or use public rulesets](#set-up-your-own-rules---or-use-pulic-rulesets)
- [Continuous code quality feedback](#continuous-code-quality-feedback)
- [Multi-file analysis](#multi-file-analysis)
- [Duplicate code detection](#duplicate-code-detection)
- [Sourcery CLI, CI, & Pre-Commit Hook options](#sourcery-cli)
- [GitHub Pull Request reviews](#github-pull-request-review)



To start using Sourcery on your code, check out our [Getting Started guide](https://docs.sourcery.ai/getting-started/).
Expand All @@ -46,6 +45,22 @@ To use Sourcery on non open sourced projects you'll need a Sourcery Pro or Sourc

## Features

### Code reviews on demand

![Sourcery Code Reviews](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/main/assets/code_review.png)

Get feedback on your code anytime you want. Sourcery can review your code directly in your IDE, looking at the branch you're currently on or the uncommitted changes you have.



### GitHub & GitLab Pull Request Review

![Sourcery Reviewing GitHub PRs](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/main/assets/Sourcery_Code_Review.gif)

Sourcery can help you speed up code reviews and clean up every new commit by automatically reviewing each of your GitHub pull requests.

To get started, add [Sourcery to your GitHub repo](https://github.com/apps/sourcery-ai/installations/new) or [GitLab project](https://app.sourcery.ai/login?connection=gitlab). Sourcery will then start reviewing every new pull request automatically!

### Real-time refactoring suggestions

![Refactoring Code with Sourcery](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/main/assets/Sourcery_VS_Code_Refactoring.gif)
Expand Down Expand Up @@ -112,34 +127,6 @@ Right-click on any item in the Explorer window and select "Sourcery → Detect C

By default, Sourcery will flag items where at least 3 lines are duplicates or near-duplicates that occur at least twice in the scanned files.

### Sourcery CLI

If you want to clean up a bigger portion of legacy code, Sourcery CLI comes in handy.

- Get started with `pip install sourcery-cli`
- With the `sourcery review` command, you can scan multiple files or directories for refactorings.
- With the `-in-place` option, you can apply the suggested refactorings immediately.

![Sourcery CLI](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/main/assets/sourcery-cli.gif)

With Sourcery CLI, you can also integrate Sourcery with your favorite tools.

#### CI / Pre-Commit Hook options:

You can use Sourcery to review every new bit of code you and your team are working on by adding Sourcery into your CI or running it as a Pre-Commit Hook.

Sourcery will review every new change and you can set it up to either automatically make changes to your code when it detects opportunities to refactor, or you can just have it notify you when it finds refactorings.

Sourcery is fully free for Open Source projects, the CI and Pre-Commit Hook options require a Sourcery Team subscription for private projects. **[You can sign up for a Team plan here](https://sourcery.ai/team/)**.

### GitHub Pull Request Review

![Sourcery Reviewing GitHub PRs](https://raw.githubusercontent.com/sourcery-ai/sourcery-vscode/main/assets/Sourcery_GitHub-Refactor-Branch.gif)

Sourcery can help you speed up code reviews and clean up every new commit by automatically reviewing each of your GitHub pull requests.

To get started, add [Sourcery to your GitHub repo](https://github.com/apps/sourcery-ai/installations/new). Sourcery will then start reviewing every new pull request automatically!

---

## Configuring Sourcery
Expand Down Expand Up @@ -310,10 +297,6 @@ def __getstate__(self):
Copy these examples into a Python file to see how Sourcery would handle them.
## Privacy / Security
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.
---
## About us
Expand Down
Binary file added assets/Sourcery_Code_Review.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/code_review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 19 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sourcery",
"displayName": "Sourcery",
"description": "Refactor Python instantly with Sourcery",
"description": "Instant Code Reviews in your IDE",
"author": "Sourcery AI",
"repository": "https://github.com/sourcery-ai/sourcery-vscode",
"bugs": {
Expand All @@ -14,6 +14,8 @@
"keywords": [
"ai",
"copilot",
"code review",
"code quality",
"tabnine",
"python",
"javascript",
Expand All @@ -23,12 +25,14 @@
"node",
"refactor",
"refactoring",
"review",
"typescript"
],
"engines": {
"vscode": "^1.76.0"
},
"categories": [
"AI",
"Linters",
"Machine Learning",
"Other",
Expand Down Expand Up @@ -104,23 +108,20 @@
]
},
{
"id": "sourcery.codeReviews",
"title": "Review Your PRs with Sourcery",
"description": "Add Sourcery to your GitHub repos to get instant, in depth code reviews on every pull request.\n[Add to GitHub](https://github.com/apps/sourcery-ai/installations/new)\n",
"id": "sourcery.acceptRecommendation",
"title": "Get Feedback on Your Current Changes",
"description": "Get an instant code review of your current branch or your uncommitted changes to get the type of feedback you expect from a peer review in seconds.",
"media": {
"markdown": "walkthrough/code_reviews.md"
}
},
},
{
"id": "sourcery.acceptRecommendation",
"title": "Use Sourcery's In-Line Suggestions",
"description": "Sourcery suggests ways to improve your code quality while you work. Put your cursor on an underline, then click the lightbulb or use the quick fix hotkey to show the code actions.\n To see this in action scroll down to the `refactoring_example` function and take the `Sourcery - Convert for loop into list comprehension` option to accept the change.\n",
"id": "sourcery.githubCodeReviews",
"title": "Review Your PRs with Sourcery",
"description": "Add Sourcery to your GitHub repos to get instant, in depth code reviews on every pull request.\n[Add to GitHub](https://github.com/apps/sourcery-ai/installations/new)\n",
"media": {
"markdown": "walkthrough/accept_recommendation.md"
},
"completionEvents": [
"onContext:acceptRecommendationContextKey"
]
"markdown": "walkthrough/github_code_reviews.md"
}
},
{
"id": "sourcery.configuration",
Expand Down Expand Up @@ -233,6 +234,11 @@
"command": "sourcery.effects.disable",
"title": "Hide Effects",
"category": "Sourcery"
},
{
"command": "sourcery.review",
"title": "Review",
"category": "Sourcery"
}
],
"submenus": [
Expand Down
Binary file removed walkthrough/NotImplemented-Comment.png
Binary file not shown.
Binary file removed walkthrough/NotImplemented-Fixed.png
Binary file not shown.
Binary file removed walkthrough/NotImplemented-Quickfix.png
Binary file not shown.
Binary file removed walkthrough/NotImplemented-Suggestion.png
Binary file not shown.
Binary file removed walkthrough/RemoveOpenR-Fixed.png
Binary file not shown.
Binary file removed walkthrough/RemoveOpenR-Hover.png
Binary file not shown.
Binary file removed walkthrough/Sourcery_Duplicates_VS_Code.gif
Binary file not shown.
Binary file removed walkthrough/Sourcery_Extract_Method_VS_Code.gif
Binary file not shown.
Binary file removed walkthrough/Sourcery_Full_Project_Scan_VS_Code.gif
Binary file not shown.
Binary file removed walkthrough/Sourcery_Token_VS_Code.gif
Binary file not shown.
Binary file added walkthrough/code_review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 7 additions & 8 deletions walkthrough/code_reviews.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
You can add Sourcery to your GitHub or GitLab repos to get immediate code review feedback on every pull/merge request.
Sourcery can review your code directly in your IDE.

![Sourcery Code Reviews](Sourcery_Code_Review.gif)
![Sourcery Code Reviews](Sourcery_Code_Review.png)

## GitHub Code Reviews
You can [directly add the Sourcery GitHub integration](https://github.com/apps/sourcery-ai/installations/new ) to any repo.
Click the Sourcery logo in the sidebar to open the coding assistant and bring up the code review panel.

Choose the context of the code you want to review.

## GitLab Code Reviews
You can run Sourcery code reviews as part of your CI to get reviews on every GitLab MR. [Follow the instructions in our documentation](https://docs.sourcery.ai/Code-Review/Getting-Started/GitLab/) to set up Sourcery for GitLab.
You can choose to review your current branch or your uncommitted changes.

Then click review and Sourcery will get to work, giving you feedback.

## Code Reviews for Other Platforms
Sourcery is not yet available for Bitbucket or other platforms, but you can [sign up for our waitlist](https://research.typeform.com/to/GoVM9jYf) to get early access when it's available.
148 changes: 0 additions & 148 deletions walkthrough/custom_rules_tutorial.md

This file was deleted.

10 changes: 10 additions & 0 deletions walkthrough/github_code_reviews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
You can add Sourcery to your GitHub or GitLab repos to get immediate code review feedback on every pull/merge request.

![Sourcery Code Reviews](Sourcery_Code_Review.gif)

## GitHub & GitLab Code Reviews
You can add Sourcery to any [GitHub](https://app.sourcery.ai/login?connection=github) or [GitLab](https://app.sourcery.ai/login?connection=gitlab) repo to start getting code reviews on every PR.


## Code Reviews for Other Platforms
Sourcery is not yet available for Bitbucket or other platforms, but you can [sign up for our waitlist](https://research.typeform.com/to/GoVM9jYf) to get early access when it's available.
Loading

0 comments on commit 0786952

Please sign in to comment.