Skip to content

Commit 1e9c385

Browse files
author
Chris
committed
Merge branch 'main' into ch9-issue
2 parents 85fa89f + ec8af00 commit 1e9c385

File tree

93 files changed

+3143
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3143
-475
lines changed

.devcontainer/Setup.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
This file will use the official Python image as the base image for the
2+
development container. It will also install some VS Code extensions for Python development,
3+
such as the Python extension and the Jupyter.
4+
5+
Finally, it will run the command pip install -r requirements.txt after the container is
6+
created, which will install all the Python libraries listed in the requirements.txt file.
7+
You can learn more about how to create and use dev containers in VS Code from this link or this link.
8+
I hope this helps you with your project http://code.visualstudio.com?WT.mc_id=academic-105485-koreyst

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"extensions": [
1818
"ms-python.python",
1919
"ms-toolsai.jupyter"
20-
]
20+
],
21+
"postCreateCommand": "pip3 --disable-pip-version-check --no-cache-dir install -r requirements.txt"
2122
}
2223
}
2324
}
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: Validate Markdown
2+
3+
on:
4+
# Trigger the workflow on pull request
5+
pull_request_target:
6+
branches:
7+
- main
8+
paths:
9+
- '**.md'
10+
- '**.ipynb'
11+
12+
permissions:
13+
contents: read
14+
id-token: write
15+
issues: write
16+
pull-requests: write
17+
18+
jobs:
19+
check-broken-paths:
20+
name: Check Broken Relative Paths
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout Repo
24+
uses: actions/checkout@v3
25+
with:
26+
ref: ${{ github.event.pull_request.head.sha }}
27+
- name: Check broken Paths
28+
id: check-broken-paths
29+
uses: john0isaac/[email protected]
30+
with:
31+
command: check-broken-paths
32+
directory: ./
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Leave broken paths comment
35+
if: ${{ steps.check-broken-paths.outputs.is-valid == 1 }}
36+
uses: actions/github-script@v6
37+
with:
38+
github-token: ${{ secrets.GITHUB_TOKEN }}
39+
script: |
40+
github.rest.issues.createComment({
41+
issue_number: context.issue.number,
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
body: `
45+
We have automatically detected the following broken relative paths in your lessons.
46+
Please check the file paths and associated broken paths inside them.
47+
Learn more from our [contributing guide](https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md).
48+
# Check Broken Paths
49+
${{ env.BROKEN_PATHS }}
50+
`
51+
})
52+
- name: Update workflow run status
53+
if: ${{ steps.check-broken-paths.outputs.is-valid == 1 }}
54+
run: exit 1
55+
check-paths-tracking:
56+
if: ${{ always() }}
57+
needs: check-broken-paths
58+
name: Check Paths Have Tracking
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout Repo
62+
uses: actions/checkout@v3
63+
with:
64+
ref: ${{ github.event.pull_request.head.sha }}
65+
- name: Run Check paths tracking
66+
id: check-paths-tracking
67+
uses: john0isaac/[email protected]
68+
with:
69+
command: check-paths-tracking
70+
directory: ./
71+
github-token: ${{ secrets.GITHUB_TOKEN }}
72+
- name: Leave paths tracking comment
73+
if: ${{ steps.check-paths-tracking.outputs.is-valid == 1 }}
74+
uses: actions/github-script@v6
75+
with:
76+
github-token: ${{ secrets.GITHUB_TOKEN }}
77+
script: |
78+
github.rest.issues.createComment({
79+
issue_number: context.issue.number,
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
body: `
83+
We have automatically detected missing tracking id from the following relative paths in your lessons.
84+
Please check the file paths and associated paths inside them.
85+
Learn more from our [contributing guide](https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md).
86+
# Check Missing Tracking from Paths
87+
${{ env.PATHS_TRACKING }}
88+
`
89+
})
90+
- name: Update workflow run status
91+
if: ${{ steps.check-paths-tracking.outputs.is-valid == 1 }}
92+
run: exit 1
93+
94+
check-urls-tracking:
95+
if: ${{ always() }}
96+
needs: check-paths-tracking
97+
name: Check URLs Have Tracking
98+
runs-on: ubuntu-latest
99+
steps:
100+
- name: Checkout Repo
101+
uses: actions/checkout@v3
102+
with:
103+
ref: ${{ github.event.pull_request.head.sha }}
104+
- name: Run Check URLs tracking
105+
id: check-urls-tracking
106+
uses: john0isaac/[email protected]
107+
with:
108+
command: check-urls-tracking
109+
directory: ./
110+
github-token: ${{ secrets.GITHUB_TOKEN }}
111+
- name: Leave URLs tracking comment
112+
if: ${{ steps.check-urls-tracking.outputs.is-valid == 1 }}
113+
uses: actions/github-script@v6
114+
with:
115+
github-token: ${{ secrets.GITHUB_TOKEN }}
116+
script: |
117+
github.rest.issues.createComment({
118+
issue_number: context.issue.number,
119+
owner: context.repo.owner,
120+
repo: context.repo.repo,
121+
body: `
122+
We have automatically detected missing tracking id from the following URLs in your lessons.
123+
Please check the file paths and associated URLs inside them.
124+
Learn more from our [contributing guide](https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md).
125+
# Check Missing Tracking from URLs
126+
${{ env.URLS_TRACKING }}
127+
`
128+
})
129+
- name: Update workflow run status
130+
if: ${{ steps.check-urls-tracking.outputs.is-valid == 1 }}
131+
run: exit 1
132+
133+
check-urls-locale:
134+
if: ${{ always() }}
135+
needs: check-urls-tracking
136+
name: Check URLs Don't Have Locale
137+
runs-on: ubuntu-latest
138+
steps:
139+
- name: Checkout Repo
140+
uses: actions/checkout@v3
141+
with:
142+
ref: ${{ github.event.pull_request.head.sha }}
143+
- name: Run Check URLs Country Locale
144+
id: check-urls-locale
145+
uses: john0isaac/[email protected]
146+
with:
147+
command: check-urls-locale
148+
directory: ./
149+
github-token: ${{ secrets.GITHUB_TOKEN }}
150+
- name: Leave URLs locale comment
151+
if: ${{ steps.check-urls-locale.outputs.is-valid == 1 }}
152+
uses: actions/github-script@v6
153+
with:
154+
github-token: ${{ secrets.GITHUB_TOKEN }}
155+
script: |
156+
github.rest.issues.createComment({
157+
issue_number: context.issue.number,
158+
owner: context.repo.owner,
159+
repo: context.repo.repo,
160+
body: `
161+
We have automatically detected added country locale to URLs in your lessons.
162+
Please check the file paths and associated URLs inside them.
163+
Learn more from our [contributing guide](https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md).
164+
# Check Country Locale in URLs
165+
${{ env.URLS_LOCALE }}
166+
`
167+
})
168+
- name: Update workflow run status
169+
if: ${{ steps.check-urls-locale.outputs.is-valid == 1 }}
170+
run: exit 1
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Welcome to the Microsoft Generative AI
2+
on:
3+
# Trigger the workflow on new issue
4+
issues:
5+
types: [opened]
6+
jobs:
7+
asses-issue:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Add Label and thanks comment to Issue
11+
uses: actions/github-script@v6
12+
with:
13+
script: |
14+
const issueAuthor = context.payload.sender.login
15+
github.rest.issues.addLabels({
16+
issue_number: context.issue.number,
17+
owner: context.repo.owner,
18+
repo: context.repo.repo,
19+
labels: ['needs-review']
20+
})
21+
github.rest.issues.createComment({
22+
issue_number: context.issue.number,
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
body: `👋 Thanks for contributing @${ issueAuthor }! We will review the issue and get back to you soon.`
26+
})
27+
- name: Auto-assign issue
28+
uses: pozil/auto-assign-issue@v1
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
assignees: koreyspace

.github/workflows/welcome-pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Welcome to the Microsoft Generative AI
2+
on:
3+
# Trigger the workflow on pull request
4+
pull_request_target:
5+
types: [opened]
6+
jobs:
7+
asses-pull-request:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Add Label and thanks comment to Pull request
11+
uses: actions/github-script@v6
12+
with:
13+
script: |
14+
const issueAuthor = context.payload.sender.login
15+
github.rest.issues.addLabels({
16+
issue_number: context.issue.number,
17+
owner: context.repo.owner,
18+
repo: context.repo.repo,
19+
labels: ['needs-review']
20+
})
21+
github.rest.issues.createComment({
22+
issue_number: context.issue.number,
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
body: `👋 Thanks for contributing @${ issueAuthor }! We will review the pull request and get back to you soon.`
26+
})
27+
- name: Auto-assign issue
28+
uses: pozil/auto-assign-issue@v1
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
assignees: koreyspace

.nojekyll

Whitespace-only changes.

00-course-setup/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This can be created by selecting the `Code` option on your forked version of thi
2222

2323
Keeping your API keys safe and secure is important when building any type of application. We encourage you not to store any API keys directly in the code you are working with as committing those details to a public repository could result in unwanted costs and issues.
2424

25-
![Dialog showing buttons to create a codespace](./images/who-will-pay.webp)
25+
![Dialog showing buttons to create a codespace](./images/who-will-pay.webp?WT.mc_id=academic-105485-koreyst)
2626

2727
## How to Run locally on your computer
2828

29-
To run the code locally on your computer, you would need to have some version of [Python installed](https://www.python.org/downloads/).
29+
To run the code locally on your computer, you would need to have some version of [Python installed](https://www.python.org/downloads/?WT.mc_id=academic-105485-koreyst).
3030

3131
To then use the repository, you need to clone it:
3232

@@ -39,7 +39,7 @@ Now you have everything checked out and can start learning and work with the cod
3939

4040
### Installing miniconda (optional step)
4141

42-
There are advantages to installing **[miniconda](https://conda.io/en/latest/miniconda.html)** - it is rather lightweight installation that supports `conda` package manager for different Python **virtual environments**. `conda` makes it easy to install and switch between different Python versions and packages, and also to install packages that are not available via `pip`.
42+
There are advantages to installing **[miniconda](https://conda.io/en/latest/miniconda.html?WT.mc_id=academic-105485-koreyst)** - it is rather lightweight installation that supports `conda` package manager for different Python **virtual environments**. `conda` makes it easy to install and switch between different Python versions and packages, and also to install packages that are not available via `pip`.
4343

4444
After you install miniconda, you need to clone the repository (if you haven't already done so) and create a virtual environment to be used for this course:
4545

@@ -65,9 +65,11 @@ conda env create --name ai4beg --file .devcontainer/environment.yml
6565
conda activate ai4beg
6666
```
6767

68+
Refer to this link on creating a [conda environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html?WT.mc_id=academic-105485-koreyst) if you run into trouble.
69+
6870
### Using Visual Studio Code with Python Extension
6971

70-
Probably the best way to use the curriculum is to open it in [Visual Studio Code](http://code.visualstudio.com/?WT.mc_id=academic-77998-bethanycheum) with [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python&WT.mc_id=academic-77998-bethanycheum).
72+
Probably the best way to use the curriculum is to open it in [Visual Studio Code](http://code.visualstudio.com/?WT.mc_id=academic-105485-koreyst) with [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python&WT.mc_id=academic-105485-koreyst).
7173

7274
> **Note**: Once you clone and open the directory in VS Code, it will automatically suggest you to install Python extensions. You would also have to install miniconda as described above.
7375

@@ -101,7 +103,7 @@ One of the best ways to keep your API keys secure when using GitHub Codespaces i
101103

102104
The course has 6 concept lessons and 6 coding lessons.
103105

104-
For the coding lessons, we are using the Azure OpenAI Service. You will need access to the Azure OpenAI service and an API key to run this code. You can apply to get access by [completing this application](https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xUOFA5Qk1UWDRBMjg0WFhPMkIzTzhKQ1dWNyQlQCN0PWcu&culture=en-us&country=us).
106+
For the coding lessons, we are using the Azure OpenAI Service. You will need access to the Azure OpenAI service and an API key to run this code. You can apply to get access by [completing this application](https://azure.microsoft.com/products/ai-services/openai-service?WT.mc_id=academic-105485-koreyst).
105107

106108
While you wait for your application to be processed, each coding lesson also includes a `README.md` file where you can view the code and outputs.
107109

@@ -111,9 +113,9 @@ If this is your first time working with the Azure OpenAI service, please follow
111113

112114
## Meet Other Learners
113115

114-
We have created channels in our official [AI Community Discord server](https://aka.ms/genai-discord) for meeting other learners. This is a great way to network with other like-minded entrepreneurs, builders, students, and anyone looking to level up in Generative AI.
116+
We have created channels in our official [AI Community Discord server](https://aka.ms/genai-discord?WT.mc_id=academic-105485-koreyst) for meeting other learners. This is a great way to network with other like-minded entrepreneurs, builders, students, and anyone looking to level up in Generative AI.
115117

116-
[![Join discord channel](https://dcbadge.vercel.app/api/server/ByRwuEEgH4)](https://aka.ms/genai-discord)
118+
[![Join discord channel](https://dcbadge.vercel.app/api/server/ByRwuEEgH4)](https://aka.ms/genai-discord?WT.mc_id=academic-105485-koreyst)
117119

118120
The project team will also be on this Discord server to help any learners.
119121

0 commit comments

Comments
 (0)