Skip to content

Commit 6a53dae

Browse files
authored
Test run and review (#6)
1 parent a76a133 commit 6a53dae

File tree

7 files changed

+57
-68
lines changed

7 files changed

+57
-68
lines changed

.github/steps/1-preparing.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ GitHub Copilot has been proven to increase developer productivity and accelerate
1313
Your most common interactions will likely be:
1414

1515
- **Inline suggestions**: As you type, Copilot uses the nearby context to suggest code directly in your editor. This will be a familiar interaction if you have used code completion tools like [Intellisense](https://code.visualstudio.com/docs/editor/intellisense), except that the completions may be entire functions.
16-
- **Copilot Chat**: A dedicated chat panel that lets you ask coding-related questions. This will be familiar if you have used only AI assistant chats. The big difference however, is that your files can provide automatic context for copilot to provide tailored responses.
16+
- **Copilot Chat**: A dedicated chat panel that lets you ask coding related questions. This will feel familiar if you have used online AI assistant chats. The big difference however, is that your project files will provide automatic context to provide tailored responses.
17+
- **Copilot Edits**: Similar to Copilot Chat, but less conversational and more big picture or goal oriented.
1718

1819
> [!TIP]
1920
> You can learn more about current and preview features in the [GitHub Copilot Features](https://docs.github.com/en/copilot/about-github-copilot/github-copilot-features) documentation.
2021
2122
> [!TIP]
22-
> You can also select different [models](https://docs.github.com/en/github-models) and [extensions](https://github.com/features/copilot/extensions), but those are different lessons!
23+
> You can also select different [models](https://docs.github.com/en/github-models) and [extensions](https://github.com/features/copilot/extensions), but that's for a different lesson!
2324
2425
### How can I use GitHub Copilot?
2526

26-
As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, XCode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as [Codespace](https://github.com/features/codespaces).
27+
As you work, you'll find GitHub Copilot can help out in several places across the website and in your favorite coding environments such as VS Code, Jet Brains, and Xcode! For today's coding though, we will practice with VS Code in a preconfigured development environment known as [Codespace](https://github.com/features/codespaces).
2728

2829
### :keyboard: Activity: Get a project intro from Copilot Chat :robot:
2930

@@ -42,9 +43,10 @@ Let's start up our development environment, use copilot to learn a bit about the
4243

4344
1. In the left sidebar, click the extensions tab and verify that the `GitHub Copilot` and `Python` extensions are installed and enabled.
4445

45-
![image](https://github.com/user-attachments/assets/c1ddca93-723d-4c62-a309-5944e5dfc6f4)
46+
<img width="350" alt="image" src="https://github.com/user-attachments/assets/ef1ef984-17fc-4b20-a9a6-65a866def468" />
47+
48+
<img width="350" alt="image" src="https://github.com/user-attachments/assets/3040c0f5-1658-47e2-a439-20504a384f77" />
4649

47-
<!-- Change above image to also display the python and python debugger extensions. -->
4850

4951
1. At the top of VS Code, locate and click the **Copilot icon** to open a Copilot Chat panel.
5052

@@ -54,9 +56,9 @@ Let's start up our development environment, use copilot to learn a bit about the
5456
@workspace Please briefly explain the structure of this project. What should I do to run it?
5557
```
5658

57-
> **Tip**: No need to follow these steps. The environment is already configured.
59+
> **Tip**: No need to follow Copilot's recommended steps. We already prepared the environment for you.
5860
59-
1. Now that we know a bit more about the project, let's actually try runnning it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debuggin** icon.
61+
1. Now that we know a bit more about the project, let's actually try runnning it! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debugging** icon.
6062

6163
<img width="300" alt="image" src="https://github.com/user-attachments/assets/50b27f2a-5eab-4827-9343-ab5bce62357e" />
6264

@@ -70,7 +72,7 @@ Let's start up our development environment, use copilot to learn a bit about the
7072
7173
### :keyboard: Activity: Use Copilot to help remember a terminal command :robot:
7274

73-
Great work! Now that you are familiar with our app, let's ask copilot for helping starting a branch so we can do some customizing.
75+
Great work! Now that we are familiar with the app and we know it works, let's ask copilot for help starting a branch so we can do some customizing.
7476

7577
1. If not already there, return to VS Code.
7678

@@ -80,15 +82,15 @@ Great work! Now that you are familiar with our app, let's ask copilot for helpin
8082
8183
1. Within the new terminal window, `right click` and select `Copilot` then `Terminal Inline Chat`.
8284

83-
> **Pro Tip:** You can also open inline chat with the keyboard shortcut `Ctrl + I` (windows) `Cmd + I` (mac).
85+
> **Pro Tip:** You can also open inline chat with the keyboard shortcut `Ctrl + I` (windows) or `Cmd + I` (mac).
8486
8587
1. Let's ask Copilot to help us remember a command we have forgotten, creating a branch and publishing it.
8688

8789
```txt
8890
Hey copilot, how can I create and publish a new Git branch?
8991
```
9092

91-
> **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is suggestion and you should always verify it first to be safe.
93+
> **Tip:** This is a simple example, but Copilot is great at providing more tailored commands that might involve loops, pattern matching, file modification, and more! Don't be afraid to ask Copilot for a suggestion. Just remember it is a suggestion and you should always verify it first to be safe.
9294
9395
1. Copilot probably gave us a command like the following. Rather than manually modify it, let's respond back to tell Copilot to use a particular name.
9496

@@ -101,7 +103,7 @@ Great work! Now that you are familiar with our app, let's ask copilot for helpin
101103
Awesome! Thanks, Copilot! Let's use the branch name "accelerate-with-copilot".
102104
```
103105

104-
> **Tip:** If something is incorrect in the response, you can always continue explaining what you need. Copilot will remember the conversation history in follow-up responses.
106+
> **Tip:** If Copilot doesn't give you quite what you want, you can always continue explaining what you need. Copilot will remember the conversation history for follow-up responses.
105107
106108
1. Now that we are happy with the command, press the `Run` button to let Copilot run it for us. No need to copy and paste!
107109

.github/steps/2-first-introduction.md

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
## Step 2: Getting work done with Copilot
22

3-
In the previous step, we Copilot was able to help us onboard to the project. That alone is a huge time save, but now let's get some work done!
3+
In the previous step, we Copilot was able to help us onboard to the project. That alone is a huge time saver, but now let's get some work done!
44

55
We recently learned there is a bug where students are registering for the same activites twice. That simply isn't acceptable, so let's get it fixed!
66

7-
Unfortunately, we were given little information to solve this problem. Let's enlist Copilot to help find the problem area and get a potential solution made.
7+
Unfortunately, we were given little information to solve this problem. So, let's enlist Copilot to help find the problem area and get a potential solution made.
88

9-
But before we do that, let's learn a bit more about Copilot.
9+
But before we do that, let's learn a bit more about Copilot! 🧑‍🚀
1010

1111
### How does Copilot work?
1212

1313
In short, you can think of Copilot like a very focused coworker. To be effective with them, you need to provide them background (context) and clear direction (prompts). Additionally, different people are better at different things because of their unique experiences (models).
1414

1515
- **How do we provide context?:** In our coding environment, Copilot will automatically consider nearby code and open tabs. If you are using chat, you can also explicitly refer to files.
1616

17-
- **What model should we pick?:** For our exercise, it shouldn't matter too much. Experimenting with different models is part of the fun!
17+
- **What model should we pick?:** For our exercise, it shouldn't matter too much. Experimenting with different models is part of the fun! That's another lesson! 🤖
1818

1919
- **How do I make prompts?:** Being explicit and clear helps Copilot do the best job. But unlike some traditional systems, you can always clarify your direction with followup prompts.
2020

21-
### :keyboard: Activity: Use Copilot to fix our registration bug :robot:
21+
### :keyboard: Activity: Use Copilot to fix our registration bug :bug:
2222

2323
1. Let's ask Copilot to suggest where our bug might be coming from. Open the Copilot Chat panel and ask the following.
2424

@@ -73,29 +73,26 @@ In short, you can think of Copilot like a very focused coworker. To be effective
7373

7474
### :keyboard: Activity: Let Copilot generate sample data :robot:
7575

76-
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce our next interface: **Inline Chat**
76+
In new project developments, it's often helpful to have some realistic looking fake data for testing. Copilot is excellent at this task, so let's add some more sample activities and introduce another way to interact with Copilot: **Inline Chat**
7777

7878
> [!TIP]
79-
> **Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context.
80-
> As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
79+
> **Inline Chat** and the **Copilot Chat** panel are very similar tools, but with slightly different automatic context. As such, while Copilot Chat is good at explaining about the project, inline chat might feel more natural for asking about a particular line or function.
8180
82-
1. If not already ready, open the `src/app.py` file.
81+
1. If not already open, open the `src/app.py` file.
8382

8483
1. Near the top (about line 23), find the `activities` variable, where our example extracurricular activies are configured.
8584

86-
1. Open the inline Copilot chat by Right-clicking on any of the related lines and selecting **Copilt** and **Editor Inline Chat**.
85+
1. Open Copilot inline chat by right-clicking on any of the related lines and selecting **Copilot** and **Editor Inline Chat**.
8786

8887
> **Tip:** You can also use the keyboard command `Ctrl + I` (windows) or `Cmd + I` (mac).
8988
90-
1. Enter the following prompt text and press the **Send and Dispatch** button.
89+
1. Enter the following prompt text and press enter or the **Send and Dispatch** button.
9190

9291
```text
9392
Add 2 more sports related activities, 2 more artistic activities, and 2 more intellectual activities.
9493
```
9594

96-
1. After a moment, Copilot will directly start making changes do the code. The changes will be stylized differently to make any additions and removals easy to identify. Take a moment to inspect and then press the **Accept** button.
97-
98-
<!-- Insert picture of diff view here -->
95+
1. After a moment, Copilot will directly start making changes to the code. The changes will be stylized differently to make any additions and removals easy to identify. Take a moment to inspect and then press the **Accept** button.
9996

10097
<details>
10198
<summary>Example Results</summary><br/>
@@ -164,27 +161,6 @@ activities = {
164161

165162
</details>
166163

167-
<!-- 1. You can use Copilot Chat inline to stay in the flow. It's often used when you are dealing with problems or want to understand a specific part of the code.
168-
169-
Hold down left button of your mouse and select this part of the file.
170-
171-
```python
172-
current_dir = Path(__file__).parent
173-
app.mount("/static", StaticFiles(directory=os.path.join(Path(__file__).parent,
174-
"static")), name="static")
175-
```
176-
177-
Then `Right click` =>`Copilot` => `Editor Inline Chat` and use the `/explain` function. -->
178-
179-
<!-- 1. Open up Copilot Chat window and ask Copilot to help you create a completely new endpoint to the API
180-
181-
```txt
182-
Hey Copilot! Create a endpoint that will allow students to sign themselves out from an activity
183-
```
184-
185-
On the bottom part of Copilot Chat you can choose what AI Model Copilot should use. Different models can provide different results.
186-
![image](https://github.com/user-attachments/assets/2668c5f8-1f28-4361-bf07-0b67d6a4e7c4) -->
187-
188164
### :keyboard: Activity: Use Copilot to describe our work :robot:
189165

190166
Nice work fixing that bug and expanding the example activities! Now let's get our work committed and pushed to GitHub, again with the help of Copilot!
@@ -199,9 +175,9 @@ Nice work fixing that bug and expanding the example activities! Now let's get ou
199175

200176
1. Above the list of staged changes, find the **Message** text box, but **don't enter anything** for now.
201177

202-
- Typically, you would write a short description of the changes here. But now we have Copilot!
178+
- Typically, you would write a short description of the changes here, but now we have Copilot to help out!
203179

204-
1. To the right of the **Message** text box, find and click the **Generate Commit Message with Copilot** button (:sparkles: icon).
180+
1. To the right of the **Message** text box, find and click the **Generate Commit Message with Copilot** button (sparkles icon).
205181

206182
1. Press the **Commit** button and **Sync Changes** button push your chagnes to GitHub.
207183

.github/steps/3-copilot-edits.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
## Step 3: Getting work done even _faster_ with Copilot Edits
22

3-
In our previous steps, we used features of Copilot that require more hands-on guidance and produced single isolated results. Now, we will explore a Copilot feature that works more holistically on our repo.
3+
In our previous steps, we used features of Copilot that require more hands-on guidance and they produced mostly localized results. Now, we will explore Copilot Edits, a feature that allows working more holistically on our repo.
44

5-
[Copilot Edits](https://code.visualstudio.com/docs/copilot/copilot-edits) works is an AI-powered code editing session to make changes across **multiple files** using natural language, and applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code.
5+
[Copilot Edits](https://code.visualstudio.com/docs/copilot/copilot-edits) is an AI-powered code editing session to make changes across **multiple files** using **natural language**, and applies the edits directly in the editor, where you can review them in-place, with the full context of the surrounding code.
66

77
#### Key features
88

@@ -35,13 +35,13 @@ In our previous steps, we used features of Copilot that require more hands-on gu
3535

3636
> **Tip:** You can also use the **Attach files...** button to provide other sources of context items, like a GitHub issue, the entire codebase, or the results of a terminal window.
3737
38-
1. Ask Copilot to display the current participants. Wait a moment for the suggestions to arrive and be applied.
38+
1. Ask Copilot to update our project to display the current participants of activities. Wait a moment for the edit suggestions to arrive and be applied.
3939

4040
```txt
4141
Hey Copilot, can you please edit the area where activities are listed on the website to show what participants are already signed up for that activity.
4242
```
4343

44-
- An extra icon has appeared next to the file names and open editor windows indicating they have been temporarily modified.
44+
- An extra icon has appeared next to the file names and open editor windows indicating they have suggested edits.
4545
- A suggested edits panel has appeared in the bottom right of the editor window providing controls to jump to the recommended changes.
4646

4747
<img width="200" alt="files with icons indicating they have been edited" src="https://github.com/user-attachments/assets/9c7c2e10-cd18-43c5-9947-cffd6dde0473" />
@@ -57,7 +57,7 @@ In our previous steps, we used features of Copilot that require more hands-on gu
5757

5858
</details>
5959

60-
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card.
60+
1. Before we simply accept the changes, please check our website again and verify everything is updated as expected. Here is an example of an updated activity card. **Important:** Your results may look slightly different!
6161

6262
<img width="350" alt="Activity card with participant info" src="https://github.com/user-attachments/assets/59fe792e-d587-487d-8525-2548ac0a7adf" />
6363

@@ -84,7 +84,7 @@ In our previous steps, we used features of Copilot that require more hands-on gu
8484

8585
If you don't get feedback, here are some things to check:
8686

87-
- Make sure your pushed the changes in the `src/static/` directory to the branch `accelerate-with-copilot`.
88-
- Make sure you opened a pull request to the `main` branch
87+
- Make sure your commite the changes in the `src/static/` directory to the branch `accelerate-with-copilot` and pushed/synchronized to GitHub.
88+
- If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
8989

9090
</details>

.github/steps/4-copilot-on-github.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,26 @@ Now, let's see how Copilot can help us finish up with during our pull request.
1414
- **compare:** `accelerate-with-copilot`
1515
- **title:** `Add registration validation and more activities`
1616

17-
1. In the **Add a description** toolbar, click the **Copilot actions** icon and **Summary** action to generate a descriptive summary based on the changes made in the pull request! :memo:
17+
1. **Use Copilot to add a description** - In the **Add a description** toolbar, click the **Copilot actions** icon and **Summary** action to describe your changes. :memo:
1818

19-
1. In the right side information panel, at the top, locate the **Reviewers** section and click the **Request** button next to a Copilot icon.
19+
1. **Ask Copilot to review your changes** - In the right side information panel at the top, locate the **Reviewers** section and click the **Request** button next to a **Copilot icon**.
2020

2121
1. Below the pull request description, press the green **Create pull request** one more time.
2222

23-
1. Wait a moment for Copilot to comment on your pull request!
23+
1. Wait a moment for Copilot to add a review comment to your pull request!
2424

2525
- Notice the log entry indicating a Copilot review was requested.
2626

27-
1. Back on the exercise issue, wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson!
27+
1. Wait a moment for Mona to check your work, provide feedback, and post a final review of this lesson!
2828

2929
1. At the bottom, press the green **Merge pull request** button. Nice work! You are all done! :tada:
30+
31+
<details>
32+
<summary>Having trouble? 🤷</summary><br/>
33+
34+
If you don't get feedback, here are some things to check:
35+
36+
- Make sure Copilot generated a description.
37+
- Make sure Copilot was requested to provide a review.
38+
39+
</details>

0 commit comments

Comments
 (0)