Skip to content

Commit 35956f3

Browse files
authored
chore: tweak welcome file to make it more immediately impactful (#230)
1 parent e2722dd commit 35956f3

File tree

1 file changed

+23
-40
lines changed

1 file changed

+23
-40
lines changed

welcome-to-sourcery.py

+23-40
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,33 @@
1+
# Welcome to Sourcery! We're here to be your pair programmer anytime you're
2+
# working in VS Code.
13

2-
# Welcome to Sourcery! We're here to be your pair programmer
3-
# anytime you're working in VS Code.
4-
5-
# To get started log into your Sourcery account. Click on
6-
# the Sourcery logo (the hexagon) on your VS Code sidebar
7-
# and click the button to log in.
8-
9-
# Or, open the command palette (Ctrl/Cmd+Shift+P) and
10-
# execute `Sourcery: Login`.
4+
# To get started log into your Sourcery account. Click on the Sourcery logo
5+
# (the hexagon) on your VS Code sidebar and click the login button, or open
6+
# the command palette (Ctrl/Cmd+Shift+P) and execute `Sourcery: Login`.
117

128
# Sourcery works in 2 ways:
13-
# 1. Gives you instant suggestions for improvements and
14-
# refactorings to your Python, JavaScript, and TypeScript
15-
# code. All of this runs fully locally.
16-
# 2. Acts as an AI powered pair programmer allowing you to ask it
17-
# questions, write new code, and interact with existing code. This
18-
# piece of Sourcery does not run locally.
19-
20-
# To start using the pair programmer section of Sourcery,
21-
# click the Sourcery sidebar option and click the Opt In button.
22-
23-
# Now you can start asking Sourcery questions or asking it
24-
# to interact with sections of your code. Let's take a look
25-
# at a few examples:
26-
27-
# Above each function you'll see a few commands - these are
28-
# Code Lenses that you can use to interact with Sourcery.
29-
# Try clicking the "Ask Sourcery" Code Lens and asking it to
30-
# update the code to use `dateutil`. The answer will appear in
31-
# the Sourcery sidebar chat.
32-
9+
# 1. A cloud-based AI powered coding assistant allowing you to ask it
10+
# questions, write new code, and interact with existing code. To get
11+
# started opt in via the Sourcery sidebar.
12+
# 2. Local analysis to give you instant suggestions for improving your
13+
# Python, JavaScript, and TypeScript code.
3314

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

40-
# With the Ask Sourcery command or the chat in the sidebar you
41-
# can ask Sourcery questions, have it write new code for you, or
42-
# update existing code.
21+
# Let's start with the coding assistant:
22+
# Above each function you'll see a few commands - these are Code Lenses that
23+
# you can use to interact with Sourcery. Try clicking on "Ask Sourcery" and
24+
# asking it to update the code to use `dateutil`. The answer will appear in
25+
# the Sourcery sidebar chat.
4326

44-
# Sourcery has a series of built in "recipes" you can quickly use
45-
# to interact with sections of code.
27+
# With the Ask Sourcery command or the chat in the sidebar you can ask Sourcery
28+
# questions, have it write new code for you, or update existing code.
4629

30+
# Sourcery also has a series of "recipes" to do different things with code.
4731
# Try clicking the Generate Docstrings lens above this next function:
4832

4933
def calculate_weighted_moving_average(prices, weights):
@@ -63,13 +47,12 @@ def calculate_weighted_moving_average(prices, weights):
6347

6448
return wma
6549

66-
# Now try clicking Generate Tests or Explain Code for the
67-
# same function!
50+
# Now try clicking Generate Tests or Explain Code for the same function!
6851

69-
# There are also recipes for Optimizing and Simplifying Code.
70-
# You can access these by clicking Ask Sourcery and choosing them
71-
# from the dropdown or by selecting a section of code and clicking
72-
# the recipe button in the sidebar.
52+
# There are also recipes for Optimizing Performance and Simplifying Code.
53+
# You can access these by clicking Ask Sourcery and choosing them from the
54+
# dropdown or by selecting a section of code and clicking the recipe button
55+
# in the sidebar.
7356

7457
# In your code you'll also see sections start to get underlined.
7558
# This means Sourcery has a suggestion to improve it.

0 commit comments

Comments
 (0)