Skip to content

Commit b091dc6

Browse files
CopilotGeekTrainer
andcommitted
Merge main, resolve conflicts, fix content path references
Co-authored-by: GeekTrainer <6109729+GeekTrainer@users.noreply.github.com>
1 parent f83547f commit b091dc6

28 files changed

Lines changed: 1842 additions & 16 deletions

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ app/client/test-results/
4444
app/client/playwright-report/
4545

4646
# e2e test database
47-
app/server/e2e_test_dogshelter.db
47+
app/server/e2e_test_dogshelter.db
48+
49+
# azure
50+
.azure

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Pets workshop
22

3-
This repository contains the project for two guided workshops to explore various GitHub features. The project is a website for a fictional dog shelter, with a [Flask](https://flask.palletsprojects.com/en/stable/) backend using [SQLAlchemy](https://www.sqlalchemy.org/) and an [Astro](https://astro.build/) frontend using [Tailwind CSS](https://tailwindcss.com/).
3+
This repository contains the project for three guided workshops to explore various GitHub features. The project is a website for a fictional dog shelter, with a [Flask](https://flask.palletsprojects.com/en/stable/) backend using [SQLAlchemy](https://www.sqlalchemy.org/) and an [Astro](https://astro.build/) frontend using [Tailwind CSS](https://tailwindcss.com/).
4+
5+
The available workshops are:
6+
7+
- **[One hour](./content/1-hour/README.md)** — focused on GitHub Copilot
8+
- **[Full-day](./content/full-day/README.md)** — a full day-in-the-life of a developer using GitHub for their DevOps processes
9+
- **[GitHub Actions](./content/github-actions/README.md)** — CI/CD pipelines from running tests to deploying to Azure
410

511
## Getting started
612

app/server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ def get_dog(id: int) -> tuple[Response, int] | Response:
8080
## HERE
8181

8282
if __name__ == '__main__':
83-
app.run(debug=True, port=5100) # Port 5100 to avoid macOS conflicts
83+
app.run(debug=True, port=5100) # Port 5100 to avoid macOS conflicts

content/1-hour/0-setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Let's create the repository you'll use for your workshop.
1717
1. Navigate to [the repository root](/)
1818
2. Select **Use this template** > **Create a new repository**
1919

20-
![Screenshot of Use this template dropdown](images/0-setup-template.png)
20+
![Screenshot of Use this template dropdown](../shared-images/setup-use-template.png)
2121

2222
3. Under **Owner**, select the name of your GitHub handle, or the owner specified by your workshop leader.
2323
4. Under **Repository**, set the name to **pets-workshop**, or the name specified by your workshop leader.
2424
5. Ensure **Public** is selected for the visibility, or the value indicated by your workshop leader.
2525
6. Select **Create repository from template**.
2626

27-
![Screenshot of configured template creation dialog](images/0-setup-configure.png)
27+
![Screenshot of configured template creation dialog](../shared-images/setup-configure-repo.png)
2828

2929
In a few moments a new repository will be created from the template for this workshop!
3030

@@ -51,19 +51,19 @@ With the repository created, it's now time to clone the repository locally. We'l
5151
- macOS / Linux:
5252

5353
```sh
54-
./scripts/start-app.sh
54+
./app/scripts/start-app.sh
5555
```
5656

5757
- Windows (PowerShell):
5858

5959
```powershell
60-
./scripts/start-app.ps1
60+
./app/scripts/start-app.ps1
6161
```
6262

6363
If you encounter execution policy warnings on Windows, run PowerShell as an administrator or execute the script with an explicit bypass, for example:
6464

6565
```powershell
66-
powershell -ExecutionPolicy Bypass -File .\scripts\start-app.ps1
66+
powershell -ExecutionPolicy Bypass -File .\app\scripts\start-app.ps1
6767
```
6868

6969
The startup script will start two applications:

content/1-hour/1-add-endpoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ With code completions, GitHub Copilot provides suggestions in your code editor w
1010

1111
It's standard to work in phases when adding functionality to an application. Given that we know we want to allow users to filter the list of dogs based on breed, we'll need to add an endpoint to provide a list of all breeds. Later we'll add the rest of the functionality, but let's focus on this part for now.
1212

13-
The application uses a Flask app with SQLAlchemy as the backend API (in the [/server][server-code] folder), and an Astro app as the frontend (in the [/client][client-code] folder). You will explore more of the project later; this exercise will focus solely on the Flask application.
13+
The application uses a Flask app with SQLAlchemy as the backend API (in the [app/server][server-code] folder), and an Astro app as the frontend (in the [app/client][client-code] folder). You will explore more of the project later; this exercise will focus solely on the Flask application.
1414

1515
> [!NOTE]
16-
> As you begin making changes to the application, there is always a chance a breaking change could be created. If the page stops working, check the terminal window you used previously to start the application for any error messages. You can stop the app by using <kbd>Ctl</kbd>+<kbd>C</kbd>, and restart it by running the script appropriate for your operating system: `./scripts/start-app.sh` (macOS / Linux) or `./scripts/start-app.ps1` (Windows PowerShell).
16+
> As you begin making changes to the application, there is always a chance a breaking change could be created. If the page stops working, check the terminal window you used previously to start the application for any error messages. You can stop the app by using <kbd>Ctl</kbd>+<kbd>C</kbd>, and restart it by running the script appropriate for your operating system: `./app/scripts/start-app.sh` (macOS / Linux) or `./app/scripts/start-app.ps1` (Windows PowerShell).
1717
1818
## Flask routes
1919

content/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Pets workshop
22

3-
This repository contains two workshops:
3+
This repository contains three workshops:
44

55
- a [one hour](./1-hour/README.md) workshop focused on GitHub Copilot.
66
- a [full-day](./full-day/README.md) workshop which covers a full day-in-the-life of a developer using GitHub for their DevOps processes.
7+
- a [GitHub Actions](./github-actions/README.md) workshop covering CI/CD pipelines from running tests to deploying to Azure.
78

8-
Both workshops are built around a fictional dog shelter, where you are a volunteer helping them build out their website.
9+
All workshops are built around a fictional dog shelter, where you are a volunteer helping them build out their website.
910

1011
## Get started
1112

content/full-day/0-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Let's create the repository you'll use for your workshop.
1212

1313
1. Navigate to [the repository root][repo-root]
1414
2. Select **Use this template** > **Create a new repository**
15-
![Screenshot of Use this template dropdown](../1-hour/images/0-setup-template.png)
15+
![Screenshot of Use this template dropdown](../shared-images/setup-use-template.png)
1616
3. Under **Owner**, select the name of your GitHub handle, or the owner specified by your workshop leader.
1717
4. Under **Repository**, set the name to **pets-workshop**, or the name specified by your workshop leader.
1818
5. Ensure **Public** is selected for the visibility, or the value indicated by your workshop leader.
1919
6. Select **Create repository from template**.
20-
![Screenshot of configured template creation dialog](../1-hour/images/0-setup-configure.png)
20+
![Screenshot of configured template creation dialog](../shared-images/setup-configure-repo.png)
2121

2222
In a few moments a new repository will be created from the template for this workshop!
2323

content/full-day/3-codespaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Before rebuilding the container, let's add **GitHub.copilot** to the list of ext
9292
6. Just below the list of ports, add the command to run the startup script to the container definition:
9393

9494
```json
95-
"postStartCommand": "chmod +x /workspaces/pets-workshop/scripts/start-app.sh && /workspaces/pets-workshop/scripts/start-app.sh",
95+
"postStartCommand": "chmod +x /workspaces/pets-workshop/app/scripts/start-app.sh && /workspaces/pets-workshop/app/scripts/start-app.sh",
9696
```
9797

9898
You've now defined a custom container!

content/full-day/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This workshop is built to help guide you through some of the most common DevOps
1515

1616
## Prerequisites
1717

18-
The application for the workshop uses is built primarily with Python (Flask and SQLAlchemy) and Astro (using Tailwind). While experience with these frameworks and languages is helpful, you'll be using Copilot to help you understand the project and generate the code. As a result, as long as you are familiar with programming you'll be able to complete the exercises!
18+
The application used for the workshop is built primarily with Python (Flask and SQLAlchemy) and Astro (using Tailwind). While experience with these frameworks and languages is helpful, you'll be using Copilot to help you understand the project and generate the code. As a result, as long as you are familiar with programming you'll be able to complete the exercises!
1919

2020
## Required resources
2121

content/github-actions/0-setup.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Workshop Setup
2+
3+
| [← GitHub Actions: From CI to CD][walkthrough-previous] | [Next: Introduction & Your First Workflow →][walkthrough-next] |
4+
|:-----------------------------------|------------------------------------------:|
5+
6+
To complete this workshop you will need to create a repository with a copy of the contents of this repository. While this can be done by [forking a repository][fork-repo], the goal of a fork is to eventually merge code back into the original (or upstream) source. In our case we want a separate copy as we don't intend to merge our changes. This is accomplished through the use of a [template repository][template-repo]. Template repositories are a great way to provide starters for your organization, ensuring consistency across projects.
7+
8+
The repository for this workshop is configured as a template, so we can use it to create your repository.
9+
10+
## Create your repository
11+
12+
Let's create the repository you'll use for your workshop.
13+
14+
1. Navigate to [the repository root][repo-root]
15+
2. Select **Use this template** > **Create a new repository**
16+
17+
![Screenshot of Use this template dropdown](../shared-images/setup-use-template.png)
18+
19+
3. Under **Owner**, select the name of your GitHub handle, or the owner specified by your workshop leader.
20+
4. Under **Repository**, set the name to **pets-workshop**, or the name specified by your workshop leader.
21+
5. Ensure **Public** is selected for the visibility, or the value indicated by your workshop leader.
22+
6. Select **Create repository from template**.
23+
24+
![Screenshot of configured template creation dialog](../shared-images/setup-configure-repo.png)
25+
26+
In a few moments a new repository will be created from the template for this workshop!
27+
28+
## Open your codespace
29+
30+
Now let's open a codespace so you have a development environment ready to go.
31+
32+
1. Navigate to the main page of your newly created repository.
33+
2. Select **Code** > **Codespaces** > **Create codespace on main**.
34+
35+
In a few moments a codespace will open in your browser with a full VS Code editor. This is where you'll create and edit files throughout the workshop.
36+
37+
> [!TIP]
38+
> If your codespace ever disconnects or you close the tab, you can reopen it by navigating to your repository and selecting **Code** > **Codespaces** and the name of your codespace.
39+
40+
## Summary and next steps
41+
42+
You've created the repository and opened a codespace — you're ready to start building! Next let's [create your first workflow][walkthrough-next].
43+
44+
| [← GitHub Actions: From CI to CD][walkthrough-previous] | [Next: Introduction & Your First Workflow →][walkthrough-next] |
45+
|:-----------------------------------|------------------------------------------:|
46+
47+
[fork-repo]: https://docs.github.com/get-started/quickstart/fork-a-repo
48+
[template-repo]: https://docs.github.com/repositories/creating-and-managing-repositories/creating-a-template-repository
49+
[repo-root]: /
50+
[walkthrough-previous]: README.md
51+
[walkthrough-next]: 1-introduction.md

0 commit comments

Comments
 (0)