Skip to content

Commit 305b3ad

Browse files
authored
Merge pull request #1 from atc-net/feature/init
Init atc-semantic-kernel
2 parents 7418730 + ee1cddc commit 305b3ad

Some content is hidden

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

47 files changed

+2630
-2
lines changed

.editorconfig

Lines changed: 532 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "Post-Integration"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '!stable'
8+
- '!release'
9+
10+
env:
11+
ATC_EMAIL: 'atcnet.org@gmail.com'
12+
ATC_NAME: 'Atc-Net'
13+
NUGET_REPO_URL: 'https://nuget.pkg.github.com/atc-net/index.json'
14+
15+
jobs:
16+
merge-to-stable:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: 🛒 Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.PAT_WORKFLOWS }}
24+
25+
- name: ⚛️ Sets environment variables - branch-name
26+
uses: nelonoel/branch-name@v1.0.1
27+
28+
- name: ⚛️ Sets environment variables - Nerdbank.GitVersioning
29+
uses: dotnet/nbgv@master
30+
with:
31+
setAllVars: true
32+
33+
- name: ⚙️ Setup dotnet 8.0.x
34+
uses: actions/setup-dotnet@v4
35+
with:
36+
dotnet-version: '8.0.x'
37+
38+
- name: ⚙️ Set up JDK 17
39+
uses: actions/setup-java@v3
40+
with:
41+
java-version: 17
42+
distribution: 'zulu'
43+
44+
- name: 🧹 Clean
45+
run: dotnet clean -c Release && dotnet nuget locals all --clear
46+
47+
- name: 🔁 Restore packages
48+
run: dotnet restore
49+
50+
- name: 🛠️ Build
51+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
52+
53+
- name: 🧪 Run unit tests
54+
run: dotnet test -c Release --no-build --filter "Category!=Integration"
55+
56+
- name: 🌩️ SonarCloud install scanner
57+
run: dotnet tool install --global dotnet-sonarscanner
58+
59+
- name: 🌩️ SonarCloud analyze
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
63+
shell: pwsh
64+
run: |
65+
dotnet sonarscanner begin /k:"atc-net_atc-semantic-kernel" /o:"atc-net" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
66+
dotnet build -c Release /p:UseSourceLink=true --no-restore
67+
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
68+
69+
- name: ⏩ Merge to stable-branch
70+
run: |
71+
git config --local user.email ${{ env.ATC_EMAIL }}
72+
git config --local user.name ${{ env.ATC_NAME }}
73+
git checkout stable
74+
git merge --ff-only main
75+
git push origin stable
76+
77+
- name: 🗳️ Creating library package for pre-release
78+
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME
79+
80+
- name: 📦 Push packages to GitHub Package Registry
81+
run: |
82+
dotnet nuget push ${GITHUB_WORKSPACE}/packages/'Atc.SemanticKernel.Connectors.Ollama.'${NBGV_NuGetPackageVersion}'.nupkg' -k ${{ secrets.GITHUB_TOKEN }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate

.github/workflows/pre-integration.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: "Pre-Integration"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
10+
jobs:
11+
dotnet-build:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- name: 🛒 Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: ⚙️ Setup dotnet 8.0.x
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '8.0.x'
26+
27+
- name: 🧹 Clean
28+
run: dotnet clean -c Release && dotnet nuget locals all --clear
29+
30+
- name: 🔁 Restore packages
31+
run: dotnet restore
32+
33+
- name: 🛠️ Building library in release mode
34+
run: dotnet build -c Release --no-restore
35+
36+
dotnet-test:
37+
runs-on: ubuntu-latest
38+
needs:
39+
- dotnet-build
40+
steps:
41+
- name: 🛒 Checkout repository
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
46+
- name: ⚙️ Setup dotnet 8.0.x
47+
uses: actions/setup-dotnet@v4
48+
with:
49+
dotnet-version: '8.0.x'
50+
51+
- name: 🔁 Restore packages
52+
run: dotnet restore
53+
54+
- name: 🛠️ Build
55+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
56+
57+
- name: 🧪 Run unit tests
58+
run: dotnet test -c Release --no-build --filter "Category!=Integration"

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Release"
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
ATC_EMAIL: 'atcnet.org@gmail.com'
8+
ATC_NAME: 'Atc-Net'
9+
NUGET_REPO_URL: 'https://api.nuget.org/v3/index.json'
10+
11+
jobs:
12+
release:
13+
if: github.ref == 'refs/heads/stable'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 🛒 Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
token: ${{ secrets.PAT_WORKFLOWS }}
21+
22+
- name: ⚛️ Sets environment variables - branch-name
23+
uses: nelonoel/branch-name@v1.0.1
24+
25+
- name: ⚛️ Sets environment variables - Nerdbank.GitVersioning
26+
uses: dotnet/nbgv@master
27+
with:
28+
setAllVars: true
29+
30+
- name: ⚙️ Setup dotnet 8.0.x
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: '8.0.x'
34+
35+
- name: 🧹 Clean
36+
run: dotnet clean -c Release && dotnet nuget locals all --clear
37+
38+
- name: 🔁 Restore packages
39+
run: dotnet restore
40+
41+
- name: 🛠️ Building library in release mode
42+
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
43+
44+
- name: ⏩ Merge to release-branch
45+
run: |
46+
git config --local user.email ${{ env.ATC_EMAIL }}
47+
git config --local user.name ${{ env.ATC_NAME }}
48+
git checkout release
49+
git merge --ff-only stable
50+
git push origin release
51+
52+
- name: 🗳️ Creating library package for release
53+
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages -p:RepositoryBranch=$BRANCH_NAME /p:PublicRelease=true
54+
55+
- name: 📦 Push packages to NuGet
56+
run: |
57+
dotnet nuget push ${GITHUB_WORKSPACE}/packages/'Atc.SemanticKernel.Connectors.Ollama.'${NBGV_NuGetPackageVersion}'.nupkg' -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_REPO_URL }} --skip-duplicate --no-symbols

Atc.Semantic.Kernel.sln

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{69C84246-AA75-43E8-94B2-66FD555B18B0}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{DAC1423F-D386-4838-AEA0-8BFFBB449ED2}"
9+
ProjectSection(SolutionItems) = preProject
10+
README.md = README.md
11+
EndProjectSection
12+
EndProject
13+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{58BC6728-197C-484C-A8EC-38BC2F0B58C4}"
14+
EndProject
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.SemanticKernel.Plugins", "src\Plugins\Atc.SemanticKernel.Plugins\Atc.SemanticKernel.Plugins.csproj", "{673BC3C5-3824-42C2-BF3B-D761192CE7DF}"
16+
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{47F559A0-49DF-48F5-ABD9-8A48962C4D47}"
18+
EndProject
19+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Connectors", "Connectors", "{B21D04E9-5AC8-4CC6-8A95-E370CC15046E}"
20+
EndProject
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.SemanticKernel.Connectors.Ollama", "src\Connectors\Atc.SemanticKernel.Connectors.Ollama\Atc.SemanticKernel.Connectors.Ollama.csproj", "{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE}"
22+
EndProject
23+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{67FE0C20-D944-47C5-A64E-AC05F7438940}"
24+
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.SemanticKernel.Client.Sample", "sample\Atc.SemanticKernel.Client.Sample\Atc.SemanticKernel.Client.Sample.csproj", "{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD}"
26+
EndProject
27+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.SemanticKernel.WebApp.Sample", "sample\Atc.SemanticKernel.WebApp.Sample\Atc.SemanticKernel.WebApp.Sample.csproj", "{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9}"
28+
EndProject
29+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atc.SemanticKernel.Console.Sample", "sample\Atc.SemanticKernel.Console.Sample\Atc.SemanticKernel.Console.Sample.csproj", "{C5299A6E-FAE1-409E-A288-7EE763642DD4}"
30+
EndProject
31+
Global
32+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
33+
Debug|Any CPU = Debug|Any CPU
34+
Release|Any CPU = Release|Any CPU
35+
EndGlobalSection
36+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
37+
{673BC3C5-3824-42C2-BF3B-D761192CE7DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{673BC3C5-3824-42C2-BF3B-D761192CE7DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{673BC3C5-3824-42C2-BF3B-D761192CE7DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{673BC3C5-3824-42C2-BF3B-D761192CE7DF}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{C5299A6E-FAE1-409E-A288-7EE763642DD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{C5299A6E-FAE1-409E-A288-7EE763642DD4}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{C5299A6E-FAE1-409E-A288-7EE763642DD4}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{C5299A6E-FAE1-409E-A288-7EE763642DD4}.Release|Any CPU.Build.0 = Release|Any CPU
57+
EndGlobalSection
58+
GlobalSection(SolutionProperties) = preSolution
59+
HideSolutionNode = FALSE
60+
EndGlobalSection
61+
GlobalSection(NestedProjects) = preSolution
62+
{673BC3C5-3824-42C2-BF3B-D761192CE7DF} = {47F559A0-49DF-48F5-ABD9-8A48962C4D47}
63+
{47F559A0-49DF-48F5-ABD9-8A48962C4D47} = {69C84246-AA75-43E8-94B2-66FD555B18B0}
64+
{B21D04E9-5AC8-4CC6-8A95-E370CC15046E} = {69C84246-AA75-43E8-94B2-66FD555B18B0}
65+
{3DAF279B-9CAE-4F4C-B030-AB3B4CAF43FE} = {B21D04E9-5AC8-4CC6-8A95-E370CC15046E}
66+
{5C37ED9E-46B8-493C-8260-30EB8DA2B3BD} = {67FE0C20-D944-47C5-A64E-AC05F7438940}
67+
{3EFEF526-4EF8-4B13-84CC-63A0F77EEBC9} = {67FE0C20-D944-47C5-A64E-AC05F7438940}
68+
{C5299A6E-FAE1-409E-A288-7EE763642DD4} = {67FE0C20-D944-47C5-A64E-AC05F7438940}
69+
EndGlobalSection
70+
GlobalSection(ExtensibilityGlobals) = postSolution
71+
SolutionGuid = {04120463-05C5-417B-8D7A-2D7D35B71A07}
72+
EndGlobalSection
73+
EndGlobal

Atc.Semantic.Kernel.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ollama/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

Directory.Build.props

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup Label="Metadata configuration">
5+
<OrganizationName>atc-net</OrganizationName>
6+
<RepositoryName>atc-semantic-kernel</RepositoryName>
7+
</PropertyGroup>
8+
9+
<!-- Solution wide properties -->
10+
<PropertyGroup Label="Assembly Naming">
11+
<Company>$(OrganizationName)</Company>
12+
<Authors>$(OrganizationName)</Authors>
13+
<NeutralLanguage>en</NeutralLanguage>
14+
<DefaultLanguage>en-US</DefaultLanguage>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Label="Compile settings">
18+
<Nullable>enable</Nullable>
19+
<LangVersion>12.0</LangVersion>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<TargetFramework>net8.0</TargetFramework>
22+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
23+
<NoWarn>1573,1591,1712,CA1014</NoWarn>
24+
25+
<!-- Used by code coverage -->
26+
<DebugType>full</DebugType>
27+
<DebugSymbols>true</DebugSymbols>
28+
</PropertyGroup>
29+
30+
<PropertyGroup Label="Analyzer settings">
31+
<AnalysisLevel>latest-All</AnalysisLevel>
32+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
33+
</PropertyGroup>
34+
35+
<!-- Treat warnings as errors are always on when building in release -->
36+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
37+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
38+
</PropertyGroup>
39+
40+
<!-- Shared code analyzers used for all projects in the solution -->
41+
<ItemGroup Label="Code Analyzers">
42+
<PackageReference Include="AsyncFixer" Version="1.6.0" PrivateAssets="All" />
43+
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
44+
<PackageReference Include="Meziantou.Analyzer" Version="2.0.150" PrivateAssets="All" />
45+
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="All" />
46+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
47+
<PackageReference Include="SonarAnalyzer.CSharp" Version="9.24.0.89429" PrivateAssets="All" />
48+
</ItemGroup>
49+
50+
</Project>

0 commit comments

Comments
 (0)