Skip to content

Commit

Permalink
docs: update walkthrough and welcome to reflect review in IDE (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellebore authored Jun 5, 2024
1 parent d1063e4 commit 629b178
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
{
"id": "sourcery.openWelcomeFile",
"title": "Explore Sourcery",
"description": "Get started by opening our tutorial \n[Open tutorial](command:toSide:sourcery.welcome.open)\n Ask Sourcery a question to improve your code. \n You can enable or disable the Sourcery Code Lenses above code for easy access. \n[Toggle Code Lens](command:sourcery.chat.toggleCodeLens)\n",
"description": "Get started by opening our tutorial \n[Open tutorial](command:toSide:sourcery.welcome.open)\n This will show you how to get code reviews straight in your IDE, as well as use the chat to ask questions \n You can enable or disable the Sourcery Code Lenses above code for easy access. \n[Toggle Code Lens](command:sourcery.chat.toggleCodeLens)\n",
"media": {
"markdown": "walkthrough/view_welcome_file.md"
},
Expand Down
14 changes: 7 additions & 7 deletions welcome-to-sourcery.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
# (the hexagon) on your VS Code sidebar and click the login button, or open
# the command palette (Ctrl/Cmd+Shift+P) and execute `Sourcery: Login`.

# Sourcery works in 2 ways:
# 1. A cloud-based AI powered coding assistant allowing you to ask it
# questions, write new code, and interact with existing code. To get
# started opt in via the Sourcery sidebar.
# 2. Local analysis to give you instant suggestions for improving your
# Python, JavaScript, and TypeScript code.
# Let's start with the coding assistant - to get started, opt in via the Sourcery sidebar.

# The `Review` tab allows you to get a code review straight away in your IDE.
# You can choose between reviewing your current uncommitted changes and reviewing
# the changes between your current branch and the default branch.
# (Note that this will only work on code that is under Git version control).

def days_between_dates(date1, date2):
d1 = datetime.datetime.strptime(date1, '%Y-%m-%d').date()
d2 = datetime.datetime.strptime(date2, '%Y-%m-%d').date()
delta = d2 - d1
return delta.days

# Let's start with the coding assistant:
# Now let's move on to the `Chat` tab.
# Above each function you'll see a few commands - these are Code Lenses that
# you can use to interact with Sourcery. Try clicking on "Ask Sourcery" and
# asking it to update the code to use `dateutil`. The answer will appear in
Expand Down

0 comments on commit 629b178

Please sign in to comment.