Skip to content

Commit f9068b1

Browse files
authored
Merge branch 'microsoft:main' into sk-connector-vectordb
2 parents 45e0af1 + e7029a6 commit f9068b1

149 files changed

Lines changed: 2998 additions & 1024 deletions

File tree

Some content is hidden

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

‎.github/workflows/dotnet-ci.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
workflow_dispatch:
99
push:
1010
branches: [ "main" ]
11+
paths:
12+
- "dotnet/**"
13+
- "samples/dotnet/**"
1114

1215
permissions:
1316
contents: read
@@ -77,7 +80,7 @@ jobs:
7780
7881
- name: Find unit test projects
7982
shell: bash
80-
run: echo "projects=$(find ./dotnet -type f -name "*.Test.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
83+
run: echo "projects=$(find ./dotnet -type f -name "*.UnitTests.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
8184

8285
- name: Test
8386
shell: bash

‎.github/workflows/dotnet-format.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
branches: [ "main" ]
1111
paths:
1212
- "dotnet/**"
13+
- "samples/dotnet/**"
1314
- "**.cs"
1415
- "**.csproj"
1516
- ".editorconfig"

‎.github/workflows/dotnet-integration-tests.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
workflow_dispatch:
99
push:
1010
branches: [ "main" ]
11+
paths:
12+
- "dotnet/**"
1113

1214
permissions:
1315
contents: read
@@ -31,17 +33,21 @@ jobs:
3133

3234
- name: Find projects
3335
shell: bash
34-
run: echo "projects=$(find ./dotnet -type f -name "*IntegrationTests.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
36+
run: echo "projects=$(find ./dotnet -type f -name "*.IntegrationTests.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
3537

3638
- name: Integration Tests
3739
shell: bash
3840
env: # Set Azure credentials secret as an input
3941
AzureOpenAI__Label: azure-text-davinci-003
42+
AzureOpenAIEmbedding__Label: azure-text-embedding-ada-002
4043
AzureOpenAI__DeploymentName: ${{ vars.AZUREOPENAI__DEPLOYMENTNAME }}
44+
AzureOpenAIEmbeddings__DeploymentName: ${{ vars.AZUREOPENAIEMBEDDING__DEPLOYMENTNAME }}
4145
AzureOpenAI__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
46+
AzureOpenAIEmbeddings__Endpoint: ${{ secrets.AZUREOPENAI__ENDPOINT }}
4247
AzureOpenAI__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }}
48+
AzureOpenAIEmbeddings__ApiKey: ${{ secrets.AZUREOPENAI__APIKEY }}
4349
Bing__ApiKey: ${{ secrets.BING__APIKEY }}
44-
OpneAI__ApiKey: ${{ secrets.OPENAI__APIKEY }}
50+
OpenAI__ApiKey: ${{ secrets.OPENAI__APIKEY }}
4551
run: |
4652
for project in ${{ env.projects }}; do
4753
dotnet test $project --verbosity normal --logger trx --results-directory ./TestResults --configuration ${{ matrix.configuration }}

‎.github/workflows/dotnet-pr.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
workflow_dispatch:
99
pull_request:
1010
branches: [ "main" ]
11+
paths:
12+
- "dotnet/**"
13+
- "samples/dotnet/**"
1114

1215
permissions:
1316
contents: read
@@ -61,7 +64,7 @@ jobs:
6164
6265
- name: Find unit test projects
6366
shell: bash
64-
run: echo "projects=$(find ./dotnet -type f -name "*.Test.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
67+
run: echo "projects=$(find ./dotnet -type f -name "*.UnitTests.csproj" | tr '\n' ' ')" >> $GITHUB_ENV
6568

6669
- name: Test
6770
shell: bash

‎.github/workflows/markdown-link-check-config.json‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
{ "pattern": "/github/" },
44
{ "pattern": "./actions" },
55
{ "pattern": "./blob" },
6-
{ "pattern": "./issues" }
7-
],
8-
"replacementPatterns": [
9-
{
10-
"pattern": "https://github.com/microsoft/semantic-kernel",
11-
"replacement": "."
12-
}
6+
{ "pattern": "./issues" },
7+
{ "pattern": "./discussions" },
8+
{ "pattern": "./pulls" }
139
],
1410
"timeout": "20s",
1511
"retryOn429": true,

‎.github/workflows/markdown-link-check.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
paths:
10+
- "**.md"
711

812
permissions:
913
contents: read

‎.github/workflows/update-version.sh‎

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
#!/bin/bash
4-
53
POSITIONAL_ARGS=()
64

75
while [[ $# -gt 0 ]]; do
@@ -34,23 +32,76 @@ done
3432

3533
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
3634

37-
echo "file = ${file}"
35+
if [ -z "$file" ]; then
36+
echo "ERROR: Parameter file (-f|--file) not provided"
37+
exit 1;
38+
elif [ ! -f "$file" ]; then
39+
echo "ERROR: file ${file} not found"
40+
exit 1;
41+
fi
42+
43+
if [ -n "$(cat $file | grep -i "<IsPackable>false</IsPackable>")" ]; then
44+
echo "Project is marked as NOT packable - skipping."
45+
exit 0;
46+
fi
47+
48+
if [ -z "$propsFile" ]; then
49+
echo "ERROR: Parameter propsFile (-f|--file) not provided"
50+
exit 1;
51+
elif [ ! -f "$propsFile" ]; then
52+
echo "ERROR: propsFile ${file} not found"
53+
exit 1;
54+
fi
55+
56+
if [ -z "$buildAndRevisionNumber" ]; then
57+
echo "ERROR: Parameter buildAndRevisionNumber (-b|--buildAndRevisionNumber) not provided"
58+
exit 1;
59+
fi
60+
61+
propsVersionString=$(cat $propsFile | grep -i "<Version>");
62+
regex="<Version>([0-9.]*)<\/Version>"
63+
if [[ $propsVersionString =~ $regex ]]; then
64+
propsVersion=${BASH_REMATCH[1]}
65+
else
66+
echo "ERROR: Version tag not found in propsFile"
67+
exit 1;
68+
fi
69+
70+
if [ -z "$propsVersion" ]; then
71+
echo "ERROR: Version tag not found in propsFile"
72+
exit 1;
73+
elif [[ ! "$propsVersion" =~ ^0.* ]]; then
74+
echo "ERROR: Version expected to start with 0. Actual: ${propsVersion}"
75+
exit 1;
76+
fi
77+
78+
fullVersionString="${propsVersion}.${buildAndRevisionNumber}-preview"
79+
80+
if [[ ! "$fullVersionString" =~ ^0.* ]]; then
81+
echo "ERROR: Version expected to start with 0. Actual: ${fullVersionString}"
82+
exit 1;
83+
fi
84+
85+
echo "==== Project: ${file} ====";
86+
echo "propsFile = ${propsFile}"
3887
echo "buildAndRevisionNumber = ${buildAndRevisionNumber}"
88+
echo "version prefix from propsFile = ${propsVersion}"
89+
echo "full version string: ${fullVersionString}"
3990

40-
echo "====${file}====";
41-
versionString=$(cat $file | grep -i "<Version>");
42-
if [ -n "$versionString" ]; then
91+
versionInProj=$(cat $file | grep -i "<Version>");
92+
if [ -n "$versionInProj" ]; then
93+
# Version tag already exists in the csproj. Let's replace it.
4394
echo "Updating version tag..."
44-
content=$(cat $file | sed --expression="s/<Version>\([0-9]*.[0-9]*\)<\/Version>/<Version>\1.$buildAndRevisionNumber-preview<\/Version>/g");
95+
content=$(cat $file | sed --expression="s/<Version>\([0-9]*.[0-9]*\)<\/Version>/<Version>$fullVersionString<\/Version>/g");
4596
else
46-
if [ -n "$(cat $file | grep -i "<IsPackable>false</IsPackable>")" ]; then
47-
echo "Project is marked as NOT packable - skipping."
48-
continue;
49-
fi
97+
# Version tag not found in the csproj. Let's add it.
5098
echo "Project is packable - adding version tag..."
51-
content=$(cat $file | sed --expression="s/<\/Project>/<PropertyGroup><Version>1.0.$buildAndRevisionNumber-preview<\/Version><\/PropertyGroup><\/Project>/g");
99+
content=$(cat $file | sed --expression="s/<\/Project>/<PropertyGroup><Version>$fullVersionString<\/Version><\/PropertyGroup><\/Project>/g");
52100
fi
53101

54102
if [ $? -ne 0 ]; then exit 1; fi
55103
echo "$content" && echo "$content" > $file;
56104
if [ $? -ne 0 ]; then exit 1; fi
105+
106+
echo "DONE";
107+
echo "";

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,7 @@ global.json
441441
**/bin/
442442
**/obj/
443443
_site
444+
445+
# Yarn
446+
.yarn
447+
.yarnrc.yml

‎.vscode/launch.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"request": "launch",
1111
"preLaunchTask": "build (KernelSyntaxExamples)",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/samples/dotnet-kernel-syntax-examples/bin/Debug/net6.0/KernelSyntaxExamples.dll",
13+
"program": "${workspaceFolder}/samples/dotnet/kernel-syntax-examples/bin/Debug/net6.0/KernelSyntaxExamples.dll",
1414
"args": [],
15-
"cwd": "${workspaceFolder}/samples/dotnet-kernel-syntax-examples",
15+
"cwd": "${workspaceFolder}/samples/dotnet/kernel-syntax-examples",
1616
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
1717
"console": "internalConsole",
1818
"stopAtEntry": false

‎.vscode/tasks.json‎

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"Build - Semantic-Kernel",
7878
"Test - Semantic-Kernel",
7979
"Run - Kernel-Demo",
80-
"R# check"
80+
"R# cleanup"
8181
],
8282
"dependsOrder": "sequence"
8383
},
@@ -103,16 +103,36 @@
103103
"label": "Test - Semantic-Kernel",
104104
"command": "dotnet",
105105
"type": "process",
106+
"args": ["test", "SemanticKernel.Test.csproj"],
107+
"problemMatcher": "$msCompile",
108+
"group": "test",
109+
"presentation": {
110+
"reveal": "always",
111+
"panel": "shared",
112+
"group": "PR-Validate"
113+
},
114+
"options": {
115+
"cwd": "${workspaceFolder}/dotnet/src/SemanticKernel.Test/"
116+
}
117+
},
118+
{
119+
"label": "Test - Semantic-Kernel (Code Coverage)",
120+
"command": "dotnet",
121+
"type": "process",
106122
"args": [
107123
"test",
108-
"${workspaceFolder}/dotnet/src/SemanticKernel.Test/SemanticKernel.Test.csproj"
124+
"--collect",
125+
"XPlat Code Coverage;Format=lcov",
126+
"SemanticKernel.Test.csproj"
109127
],
110128
"problemMatcher": "$msCompile",
111129
"group": "test",
112130
"presentation": {
113131
"reveal": "always",
114-
"panel": "shared",
115-
"group": "PR-Validate"
132+
"panel": "shared"
133+
},
134+
"options": {
135+
"cwd": "${workspaceFolder}/dotnet/src/SemanticKernel.Test/"
116136
}
117137
},
118138
{
@@ -133,13 +153,13 @@
133153
}
134154
},
135155
{
136-
"label": "Run - Starter API Azure Function",
156+
"label": "Run - Kernel HTTP Server",
137157
"command": "func",
138158
"type": "shell",
139159
"args": ["start", "--csharp"],
140160
"group": "test",
141161
"options": {
142-
"cwd": "${workspaceFolder}/samples/starter-api-azure-function"
162+
"cwd": "${workspaceFolder}/samples/dotnet/KernelHttpServer"
143163
},
144164
"presentation": {
145165
"reveal": "always",
@@ -154,7 +174,37 @@
154174
"args": ["start"],
155175
"group": "test",
156176
"options": {
157-
"cwd": "${workspaceFolder}/samples/starter-chat-webapp-react"
177+
"cwd": "${workspaceFolder}/samples/apps/chat-summary-webapp-react"
178+
},
179+
"presentation": {
180+
"reveal": "always",
181+
"panel": "shared",
182+
"group": "Run-Samples"
183+
}
184+
},
185+
{
186+
"label": "Run - Book Creator WebApp React",
187+
"command": "yarn",
188+
"type": "shell",
189+
"args": ["start"],
190+
"group": "test",
191+
"options": {
192+
"cwd": "${workspaceFolder}/samples/apps/book-creator-webapp-react"
193+
},
194+
"presentation": {
195+
"reveal": "always",
196+
"panel": "shared",
197+
"group": "Run-Samples"
198+
}
199+
},
200+
{
201+
"label": "Run - Auth API WebApp React",
202+
"command": "yarn",
203+
"type": "shell",
204+
"args": ["start"],
205+
"group": "test",
206+
"options": {
207+
"cwd": "${workspaceFolder}/samples/apps/auth-api-webapp-react"
158208
},
159209
"presentation": {
160210
"reveal": "always",

0 commit comments

Comments
 (0)