From c0dda75661d4ef872b59308a0859baa063400cfa Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:14:34 +0000 Subject: [PATCH 01/10] chore: add *.temp* to .gitignore to exclude temporary files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index fce604d..8bcfef9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.temp* + # Compiled source # ################### *.com From c7284dad68994d05fce6bb690281adeb1fdcb120 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:23:10 +0000 Subject: [PATCH 02/10] fix: clarify instructions for creating a Codespace with default configuration --- .github/steps/1-preparing.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/steps/1-preparing.md b/.github/steps/1-preparing.md index 6fdb38f..1dd9c5e 100644 --- a/.github/steps/1-preparing.md +++ b/.github/steps/1-preparing.md @@ -14,14 +14,10 @@ GitHub Copilot has been proven to increase developer productivity and accelerate ### :keyboard: Activity: Getting to know basic Copilot features :robot: -1. Right-click the below button to open the **Create Codespace** page in a new tab. +1. Right-click the below button to open the **Create Codespace** page in a new tab. Use the default configuration. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/{{full_repo_name}}?quickstart=1) - - The free tier of Codespaces that comes with all GitHub accounts is fine, assuming you still have minutes available. - - The default Codespace settings are fine. - - This repository will provide the additional settings and files for making your extension. - 1. Confirm the **Repository** field is your copy of the exercise, not the original, then click the green **Create Codespace** button. - ✅ Your copy: `/{{{full_repo_name}}}` From 2214898d595847cf6d57f99b3df75050ed5c380f Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:47:54 +0000 Subject: [PATCH 03/10] fix: update Python version in devcontainer configuration to 3.13 --- .devcontainer/devcontainer.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3758463..61f3f3c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,6 @@ { "name": "Python 3", - "image": "mcr.microsoft.com/vscode/devcontainers/python:3.9", - "features": { - "ghcr.io/devcontainers/features/python:1": { - "version": "3.13" - } - }, + "image": "mcr.microsoft.com/vscode/devcontainers/python:3.13", "postCreateCommand": "pip install -r requirements.txt", "customizations": { "vscode": { From aa32754542bd316f73551c5a2221a1919659362d Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 09:53:18 +0000 Subject: [PATCH 04/10] docs: update instructions for using Copilot Chat with codebase explanation --- .github/steps/1-preparing.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/steps/1-preparing.md b/.github/steps/1-preparing.md index 1dd9c5e..9b3be88 100644 --- a/.github/steps/1-preparing.md +++ b/.github/steps/1-preparing.md @@ -30,8 +30,13 @@ GitHub Copilot has been proven to increase developer productivity and accelerate 1. Search for the Copilot Icon on the top right section of your editor. - Open up Copilot Chat and ask Copilot to introduce you to the project, to do that type `/explain` in the Chat Window. - + Open up Copilot Chat and ask Copilot to introduce you to the project. + + Use the `@workspace` + ```txt + @workspace Briefly explain the structure of the codebase in this repository. + ``` + 1. Run the project by using `Run and Debug` section in the left sidebar of VS Code. Then head to the ports tab and open the application available on port 8000 From f12fdc7675e0919302a08ac5b428625ff566a351 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 10:11:01 +0000 Subject: [PATCH 05/10] feat: add port forwarding for development server in devcontainer configuration --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 61f3f3c..7d27936 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,7 @@ { "name": "Python 3", "image": "mcr.microsoft.com/vscode/devcontainers/python:3.13", + "forwardPorts": [8000], "postCreateCommand": "pip install -r requirements.txt", "customizations": { "vscode": { From ca7c33cfcded31bf0955e5e691d431e2245e490f Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:17:50 +0100 Subject: [PATCH 06/10] docs: Add additional explanations/screenshots to step1 --- .github/steps/1-preparing.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/steps/1-preparing.md b/.github/steps/1-preparing.md index 9b3be88..51e7e34 100644 --- a/.github/steps/1-preparing.md +++ b/.github/steps/1-preparing.md @@ -27,17 +27,22 @@ GitHub Copilot has been proven to increase developer productivity and accelerate 1. Click the extensions sidebar tab and verify that `GitHub Copilot` extension is installed. - + ![image](https://github.com/user-attachments/assets/c1ddca93-723d-4c62-a309-5944e5dfc6f4) + 1. Search for the Copilot Icon on the top right section of your editor. Open up Copilot Chat and ask Copilot to introduce you to the project. - Use the `@workspace` ```txt @workspace Briefly explain the structure of the codebase in this repository. ``` -1. Run the project by using `Run and Debug` section in the left sidebar of VS Code. Then head to the ports tab and open the application available on port 8000 +1. Run the project by using `Run and Debug` section in the left sidebar of VS Code. + + image + + +1. Then head to the ports tab and open the application available on port `8000` From 13fbaba00597f9a58119ac24fdbd81203f3e3821 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:09:26 +0100 Subject: [PATCH 07/10] docs: Update comment, add ports screenshot to step 1 --- .github/steps/1-preparing.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/steps/1-preparing.md b/.github/steps/1-preparing.md index 51e7e34..c32b18d 100644 --- a/.github/steps/1-preparing.md +++ b/.github/steps/1-preparing.md @@ -44,11 +44,12 @@ GitHub Copilot has been proven to increase developer productivity and accelerate 1. Then head to the ports tab and open the application available on port `8000` - + ![image](https://github.com/user-attachments/assets/92d5642e-ce99-4a66-850c-2d311a673596) + 1. Great! Now that you know what we will be working with, let's have your first interaction with Copilot. - Open up a terminal in VS Code so you won't interrupt the debug session you just started. + Open up a terminal a new terminal window in VS Code so you won't interrupt the debug session you just started in the current one. Next, `Right click` within the newly created terminal window, then click `Copilot` => `Terminal Inline Chat`. From eb2e398d12b539dc40ed87c290f94468f0704d16 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 11:16:45 +0000 Subject: [PATCH 08/10] docs: add example suggestion for Copilot usage in introduction step --- .github/steps/2-first-introduction.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/steps/2-first-introduction.md b/.github/steps/2-first-introduction.md index 03e47ef..847dfd6 100644 --- a/.github/steps/2-first-introduction.md +++ b/.github/steps/2-first-introduction.md @@ -26,6 +26,30 @@ There are many Copilot Features and interaction modes. In this step you will get Press `Tab` to accept your first Copilot suggestion :tada: :robot: + +
+ Example suggestion
+ + ```python + @app.post("/activities/{activity_name}/signup") + def signup_for_activity(activity_name: str, email: str): + """Sign up a student for an activity""" + # Validate activity exists + if activity_name not in activities: + raise HTTPException(status_code=404, detail="Activity not found") + + # Validate student is not already signed + if email in activities[activity_name]["participants"]: + raise HTTPException(status_code=400, detail="Student is already signed up") + + activity = activities[activity_name] + + # Add student + activity["participants"].append(email) + return {"message": f"Signed up {email} for {activity_name}"} + ``` +
+ > **TIP**: If you would like to see other suggestions, instead of pressing `Tab`, hover over the suggestion and a small panel will show up. On it's right side click the three dots `...` and select `Open Completions Panel` From 390eff3ced682847c5863d36a634c99fa5cc951d Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:21:18 +0100 Subject: [PATCH 09/10] docs: Add extra documentation and screenshots for step 2 --- .github/steps/2-first-introduction.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/steps/2-first-introduction.md b/.github/steps/2-first-introduction.md index 847dfd6..30d67ca 100644 --- a/.github/steps/2-first-introduction.md +++ b/.github/steps/2-first-introduction.md @@ -60,6 +60,7 @@ There are many Copilot Features and interaction modes. In this step you will get ``` On the bottom part of Copilot Chat you can choose what AI Model Copilot should use. Different models can provide different results. + ![image](https://github.com/user-attachments/assets/2668c5f8-1f28-4361-bf07-0b67d6a4e7c4) 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. @@ -78,6 +79,9 @@ There are many Copilot Features and interaction modes. In this step you will get 1. On the right side of the commit message window click :sparkles: to generate commit message with copilot 1. Commit and sync your changes with the automatically generated message + ![image](https://github.com/user-attachments/assets/7d3daf4e-4125-4775-88a7-33251cd7293e) + + 1. Wait a moment for the bot to check your work. You will see a comment with progress info and the next lesson.
From 299a46bccfd308d5b92d1553ee83a0658242aee1 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Tue, 4 Mar 2025 12:31:55 +0100 Subject: [PATCH 10/10] docs: Update docs for step3 with screenshots --- .github/steps/3-copilot-edits.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/steps/3-copilot-edits.md b/.github/steps/3-copilot-edits.md index 3d1f210..200a2ae 100644 --- a/.github/steps/3-copilot-edits.md +++ b/.github/steps/3-copilot-edits.md @@ -22,7 +22,10 @@ ### :keyboard: Activity: Let's add a feature! -1. In the top left part of Copilot Chat window, switch the Copilot Edits. +1. In the top left part of Copilot Chat window, switch to Copilot Edits. + + ![image](https://github.com/user-attachments/assets/0b17c5bd-d03b-41b1-b97d-624fcbf8ccd1) + 1. Add the following files to the working set. Use the attach button in the bottom left corner of Copilot Edits view. - `src/static/app.js` - `src/static/index.html` @@ -35,7 +38,18 @@ Copilot will generate inline edits for you. You can accept them or if this wasn't what you were hoping for, provide Copilot additional instructions. - > **TIP:** On the bottom part of Copilot Edits you can choose what AI Model Copilot should use. Different models can provide different results. + > **TIP:** On the bottom part of Copilot Edits you can choose what AI Model Copilot should use. Different models can provide different results. + +
+ Having trouble? 🤷
+ + Remember, to add the relevant files to the working set. + + + ![image](https://github.com/user-attachments/assets/bdd7318b-50e3-46d0-88ce-7615f45ce334) + + +
1. Head back to the website and see your changes!