Skip to content

Commit 8dc70da

Browse files
authored
Merge pull request #14 from continuous-copilot/issue-based
Add GitHub workflows and review documentation for Copilot exercises
2 parents 467ab5c + 9f92dc4 commit 8dc70da

15 files changed

+1333
-52
lines changed

.github/steps/1-preparing.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ Great work! Now that we are familiar with the app and we know it works, let's as
118118
119119
1. After a moment, look in the VS Code lower status bar, on the left, to see the active branch. It should now say `build-octofit-app`. If so, you are all done with this step!
120120
121-
## Next step
121+
1. Now that your branch is pushed to GitHub, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.
122122
123-
Now that your branch is pushed to GitHub, let's continue on to the next step Step 2: Application Initial Setup - {{{next_step_file}}}.
123+
<details>
124+
<summary>Having trouble? 🤷</summary><br/>
125+
126+
If you don't get feedback, here are some things to check:
127+
128+
- Make sure your created the branch with the exact name `build-octofit-app`. No prefixes or suffixes.
129+
- Make sure the branch was indeed published to your repository.
130+
131+
</details>

.github/steps/2-application-initial-setup.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ In this step, we will accomplish the following:
1010
2. Click the GitHub Copilot Chat click the :paperclip: and add "Open Editors" to the prompt.
1111
3. Copy and paste the following prompt in the GitHub Copilot Chat and select the "Agent" instead of "Ask" or "Edit" from the drop down where you are inserting the prompt.
1212

13-
<img src="https://github.com/user-attachments/assets/0c8e4ace-1f39-4c5d-8232-379fcf5316c1" width=60% height=60%>
13+
<img src="https://github.com/user-attachments/assets/e172f5c0-bc2a-45a9-a301-9af8bfbd6a2e" width=60% height=60%>
1414

15-
>[!NOTE]
15+
> [!NOTE]
1616
> Do not change the model from GPT-4o this will be an optional activity at the end of the course.
1717
> Keep in mind that the Copilot agent mode is conversational so it may ask you questions and you can ask it questions too.
1818
> Wait a moment for the Copilot to respond and press the continue button to execute commands presented by Copilot agent mode.
1919
> Keep files created and updated by Copilot agent mode until it is finished.
20-
> Agent mode has the ability to evaluate your code base and execute commands and add/refactor/delete parts of your code base and automatically self heal if it or you make a mistake in the process.
20+
> Agent mode has the ability to evaluate your code base and execute commands and add/refactor/delete parts of your code base and automatically self heal if it or you makes a mistake in the process.
2121
2222
### :keyboard: Activity: Prompt for GitHub Copilot in agent mode to start the creation of our application
2323

@@ -33,18 +33,19 @@ In this step, we will accomplish the following:
3333
>
3434
> Don't proceed with the next activity until all of these steps are completed.
3535
>```
36+
>
3637
3738
> [!IMPORTANT]
3839
> Once the above activity installs all the required packages, proceed to the next activity.
3940
40-
### :keyboard: Activity: Let's install MongoDB
41+
### :keyboard: Activity: Let's install mongoDB
4142
4243
> **Prompt**
4344
>
4445
> ```prompt
45-
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Mergington's high school's app. Let's install MongoDB.
46+
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for mergington's high schools app. > Let's install mongoDB.
4647
>
47-
> 1. Install MongoDB and make sure the command is complete.
48+
> 1. Install mongoDB and make sure the command is complete.
4849
>
4950
> Don't proceed with the next activity until all of these steps are completed.
5051
>```
@@ -53,15 +54,15 @@ In this step, we will accomplish the following:
5354
> If the command completes in the terminal but agent mode shows it is still running click stop.
5455
> You may need to paste the prompt again in agent mode.
5556
56-
### :keyboard: Activity: Let's start and verify MongoDB is running
57+
### :keyboard: Activity: Let's start and verify mongoDB is running
5758
5859
> **Prompt**
5960
>
6061
> ```prompt
61-
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Mergington's high school's app. Let's start and verify MongoDB is running.
62+
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for mergington's high schools app. > Let's start and verify mongoDB is running.
6263
>
63-
> 1. Start the MongoDB service.
64-
> 2. Verify the MongoDB service is running.
64+
> 1. Start the mongoDB service.
65+
> 2. Verify the mongoDB service running.
6566
>
6667
> Don't proceed with the next activity until all of these steps are completed.
6768
>```
@@ -73,6 +74,19 @@ In this step, we will accomplish the following:
7374
> If the command completes in the terminal but agent mode shows it is still running click stop.
7475
> You may need to paste the prompt again in agent mode.
7576
76-
## Next step
77+
1. Now that we have created the app directory structure, setup a Python virtual environment, and Copilot agent mode helped write a requirements.txt to install all project dependencies let's check our changes in to our `build-octofit-app` branch.
78+
79+
1. With our new changes complete, please **commit** and **push** the changes to GitHub.
80+
81+
1. Wait a moment for Mona to check your work, provide feedback, and share the final lesson. Almost done!
82+
83+
<details>
84+
<summary>Having trouble? 🤷</summary><br/>
85+
86+
If you don't get feedback, here are some things to check:
87+
88+
- Make sure your commit changes were made for the following file to the branch `build-octofit-app` and pushed/synchronized to GitHub:
89+
- `octofit-tracker/backend/requirements.txt` and it contains the package `Django==4.1`
90+
- If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
7791
78-
Now that the application structure and initial setup is complete, let's continue on to the next step [Step 3: Database and Django Project Setup](./3-database-django-project-setup.md)
92+
</details>

.github/steps/3-database-django-project-setup.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
In this step, we will accomplish the following:
44

5-
- Setup the octofit_db MongoDB database structure.
5+
- Set up the octofit_db MongoDB database structure.
66
- Update the octofit-tracker/backend/octofit_tracker app files:
7-
- settings, models, serializers, urls, views, tests, admin files.
7+
- settings, models, serializers, urls, views, tests, and admin files.
88
- Populate the octofit_db database with test data.
99
- Verify the test data is populated in the octofit_db database.
1010

1111
1. Open all files in the `docs` folder and keep this file open in the editor.
12-
2. Click the GitHub Copilot Chat click the :paperclip: and add "Open Editors" to the prompt.
13-
3. Copy and paste the following prompt in the GitHub Copilot Chat and select the "Agent" instead of "Ask" or "Edit" from the drop down where you are inserting the prompt.
12+
2. Click the GitHub Copilot Chat, click the :paperclip:, and add "Open Editors" to the prompt.
13+
3. Copy and paste the following prompt in the GitHub Copilot Chat and select the "Agent" instead of "Ask" or "Edit" from the dropdown where you are inserting the prompt.
1414

1515
>[!NOTE]
16-
> Do not change the model from GPT-4o this will be an optional activity at the end of the course.
17-
> Keep in mind that the Copilot agent mode is conversational so it may ask you questions and you can ask it questions too.
16+
> Do not change the model from GPT-4; this will be an optional activity at the end of the course.
17+
> Keep in mind that the Copilot agent mode is conversational, so it may ask you questions, and you can ask it questions too.
1818
> Wait a moment for the Copilot to respond and press the continue button to execute commands presented by Copilot agent mode.
1919
> Keep files created and updated by Copilot agent mode until it is finished.
20-
> Agent mode has the ability to evaluate your code base and execute commands and add/refactor/delete parts of your code base and automatically self heal if it or you makes a mistake in the process.
20+
> Agent mode has the ability to evaluate your codebase and execute commands and add/refactor/delete parts of your codebase and automatically self-heal if it or you make a mistake in the process.
2121
2222
### :keyboard: Activity: Setup the Python Django project/app
2323

@@ -41,11 +41,11 @@ In this step, we will accomplish the following:
4141
> **Prompt**
4242
>
4343
> ```prompt
44-
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Mergington's high school's app. Let's initialize the octofit_db database.
44+
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Merington's high school's app. Let's initialize the octofit_db database.
4545
>
4646
> 1. Initialize the mongo octofit_db database.
4747
> 2. Create a correct table structure for users, teams, activity, leaderboard, and workouts collections.
48-
> 3. Make sure there is a unique id for primary key for the user collection.
48+
> 3. Make sure there is a unique ID for the primary key for the user collection.
4949
> ex. db.users.createIndex({ "email": 1 }, { unique: true })
5050
> 4. Execute the command for me to create the database.
5151
> 5. List the collections in the octofit_db database.
@@ -54,8 +54,8 @@ In this step, we will accomplish the following:
5454
> ```
5555
5656
> [!IMPORTANT]
57-
> You may need to copy and paste the response in the terminal if there is no "Continue" button.
58-
> Sometimes there is a scrolling issue and there may not be a "Continue" button.
57+
> If there is no "Continue" button, just pull the left side of the GitHub Copilot Chat panel over to the left, and it should appear.
58+
> If this doesn't work, you may need to copy and paste the response in the terminal if there is no "Continue" button.
5959
6060
### :keyboard: Activity: Update the Python Django project/app files
6161
@@ -77,25 +77,41 @@ In this step, we will accomplish the following:
7777
> 11. Install CORS middleware components.
7878
>
7979
> Don't proceed with the next activity until all of these steps are completed.
80+
> ```
8081
81-
### :keyboard: Activity: populate the octofit_db database with test data from Django project/app files
82+
### :keyboard: Activity: Populate the octofit_db database with test data from Django project/app files
8283
8384
> **Prompt**
8485
>
8586
> ```prompt
86-
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Mergington's high school's app. Let's populate the octofit_db database with test data. Use same data from docs/mona-high-school-fitness-tracker.md file.
87+
> Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Merington's high school's app. Let's populate the octofit_db database with test data. Use the same data from docs/mona-high-school-fitness-tracker.md file.
8788
>
8889
> 1. Create a test data file in the octofit-tracker/backend/octofit_tracker directory.
8990
> 2. Run makemigrations and migrate the database in a Python virtual environment.
9091
> 3. Populate the octofit_db database with test data for users, teams, activities, leaderboard, and workouts collections based on test data in docs/mona-high-school-fitness-tracker.md populate_db.py.
9192
> 4. Verify the test data is populated in the octofit_db database.
9293
>
9394
> Don't proceed with the next activity until all of these steps are completed.
94-
>```
95+
> ```
9596
9697
> [!IMPORTANT]
97-
> You may need to prompt agent mode and tell it that "the command is cut off".
98+
> If there is no "Continue" button, just pull the left side of the GitHub Copilot Chat panel over to the left, and it should appear.
99+
> If this doesn't work, you may need to copy and paste the response in the terminal if there is no "Continue" button.
100+
101+
1. Now that we have created the database structure, updated our Django project files, and populated the database, let's check our changes into our `build-octofit-app` branch.
102+
103+
1. With our new changes complete, please **commit** and **push** the changes to GitHub.
104+
105+
1. Wait a moment for Mona to check your work, provide feedback, and share the final lesson. Almost done!
106+
107+
<details>
108+
<summary>Having trouble? 🤷</summary><br/>
109+
110+
If you don't get feedback, here are some things to check:
98111
99-
## Next step
112+
- Make sure your commit changes were made for the following files to the branch `build-octofit-app` and pushed/synchronized to GitHub:
113+
- `octofit-tracker/backend/octofit_tracker/settings.py`
114+
- `octofit-tracker/backend/octofit_tracker/management/commands/populate_db.py`
115+
- If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
100116
101-
Now that the Django project backend setup and the database is populated, let's continue on to the next step [Step 4: Setup Django REST Framework](./4-setup-django-rest-framework.md)
117+
</details>

.github/steps/4-setup-django-rest-framework.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In this step, we will accomplish the following:
2929
> ```prompt
3030
>Based on the example monafit tracker app in the docs/mona-high-school-fitness-tracker.md file and use octofit as the name for Mergington's high school's app. Let's setup codespace for the URL, restart the server, and test the API.
3131
>
32-
> 1. Activate the python virtual environment.
32+
> 1. Activate the Python virtual environment.
3333
> 2. Update #file:octofit-tracker/backend/octofit_tracker/views.py to replace the return for the REST API URL endpoints with the codespace URL https://[REPLACE-THIS-WITH-YOUR-CODESPACE-NAME]-8000.app.github.dev for Django and avoid certificate HTTPS issues.
3434
> 3. Make sure the Django backend works on [REPLACE-THIS-WITH-YOUR-CODESPACE-NAME]-8000.app.github.dev and localhost:8000.
3535
> 4. Test the API endpoints using curl command.
@@ -40,13 +40,28 @@ In this step, we will accomplish the following:
4040
4141
Now, let's actually try running the Django application! In the left sidebar, select the `Run and Debug` tab and then press the **Start Debugging** icon.
4242
43-
<img src="https://github.com/user-attachments/assets/b1921335-ca68-465a-8845-bf4a750a47a2" width=30% height=30%>
43+
<img src="https://github.com/user-attachments/assets/baef4dfe-0751-45cb-9e16-8ff26ba9ff58" width=30% height=30%>
4444
4545
>[!IMPORTANT]
4646
> Make sure to replace [REPLACE-THIS-WITH-YOUR-CODESPACE-NAME] with your codespace name.
4747
> ex. redesigned-spork-g6pj46rr9hpp6x
4848
> You can get the codespace name by running the following command in the terminal: `echo $CODESPACE_NAME`.
4949
50-
## Next step
50+
1. Now that we have updated our Django product to include our codespace name for the URL endpoint,
51+
let's check our changes in to our `build-octofit-app` branch.
5152
52-
Now that the Django REST framework is setup, let's continue on to the next step [Step 5: Setup the React Frontend Framework](./5-setup-frontend-react-framework.md)
53+
1. With our new changes complete, please **commit** and **push** the changes to GitHub.
54+
55+
1. Wait a moment for Mona to check your work, provide feedback, and share the final lesson. Almost done!
56+
57+
<details>
58+
<summary>Having trouble? 🤷</summary><br/>
59+
60+
If you don't get feedback, here are some things to check:
61+
62+
- Make sure your commit changes were made for the following files to the branch `build-octofit-app` and pushed/synchronized to GitHub:
63+
- `octofit-tracker/backend/octofit_tracker/settings.py`
64+
- `octofit-tracker/backend/octofit_tracker/views.py`
65+
- If Mona found a mistake, simply make a correction and push your changes again. Mona will check your work as many times as needed.
66+
67+
</details>

0 commit comments

Comments
 (0)