Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Elasticsearch and clean up project files #483

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,17 @@ csharp_style_expression_bodied_local_functions = false:silent
[**/*.{FunctionalTests,TestApplication,UnitTests}/**.cs]
dotnet_diagnostic.CA1303.severity = none # Passing literal strings as values
dotnet_diagnostic.CA2007.severity = none # no need of ConfigureAwait(false) in tests
dotnet_diagnostic.CS1591.severity = none # Missing XML comment for publicly visible type or member
dotnet_diagnostic.IDE0005.severity = none # No need for documentation
dotnet_diagnostic.IDE1006.severity = none # No need for Async suffix on test names
resharper_inconsistent_naming_highlighting = none

[examples/**.cs]
dotnet_diagnostic.CA1303.severity = none # Passing literal strings as values
dotnet_diagnostic.CA2007.severity = none # no need of ConfigureAwait(false) in examples
dotnet_diagnostic.CS1591.severity = none # Missing XML comment for publicly visible type or member
dotnet_diagnostic.IDE0005.severity = none # No need for documentation
dotnet_diagnostic.IDE1006.severity = none # No need for Async suffix on test names
dotnet_diagnostic.SKEXP0003.severity = none
dotnet_diagnostic.SKEXP0011.severity = none
dotnet_diagnostic.SKEXP0052.severity = none
Expand Down
114 changes: 102 additions & 12 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<!-- App Settings -->
<Project>
<PropertyGroup>
<!-- Default properties inherited by all projects. Projects can override. -->
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RollForward>LatestMajor</RollForward>
</PropertyGroup>

<PropertyGroup>
<!-- Disable NuGet packaging by default. Projects can override. -->
<IsPackable>disable</IsPackable>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
Expand All @@ -28,7 +17,7 @@
</PropertyGroup>

<PropertyGroup>
<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))</RepoRoot>
<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))/</RepoRoot>
</PropertyGroup>

<ItemGroup>
Expand All @@ -37,4 +26,105 @@
<_Parameter1>false</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<!-- ################################# -->
<!-- ###### CODE ANALYSIS START ###### -->
<!-- ################################# -->

<PropertyGroup>
<!-- Default properties inherited by all projects. Projects can override. -->
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>All</AnalysisMode>
<AnalysisLevel>latest</AnalysisLevel>
<!-- Used by IDE0005 -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Roslynator.Formatting.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<!-- ###### CODE ANALYSIS END ######## -->

<!-- ################################# -->
<!-- ###### NUGET START ############## -->
<!-- ################################# -->

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- Central version prefix - applies to all nuget packages. -->
<Version>0.51.0</Version>

<!-- Disable NuGet packaging by default. Projects can override. -->
<IsPackable>false</IsPackable>

<!-- Default description and tags. Packages can override. -->
<OutputType>Library</OutputType>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<Product>Kernel Memory</Product>
<Description>Memory Service and Plugin to index and query any data using LLM and natural language, tracking sources and showing citations.</Description>
<PackageTags>Memory, RAG, Plugin, Semantic Memory, Episodic Memory, Declarative Memory, Copilot, AI, Kernel Memory, Artificial Intelligence, Embeddings, Vector DB, Vector Search, Memory DB, ETL</PackageTags>

<!-- Required license, copyright, and repo information. Packages can override. -->
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageProjectUrl>https://github.com/microsoft/kernel-memory</PackageProjectUrl>
<RepositoryUrl>https://github.com/microsoft/kernel-memory</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<!-- Use icon linked below -->
<PackageIcon>icon.png</PackageIcon>
<PackageIconUrl>icon.png</PackageIconUrl>

<!-- Use readme linked by the project (csproj must include a README) -->
<PackageReadmeFile>README.md</PackageReadmeFile>

<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<!-- Embed C# sources in PDB -->
<EmbedAllSources>true</EmbedAllSources>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
<!-- SourceLink allows step-through debugging for source hosted on GitHub. -->
<!-- https://github.com/dotnet/sourcelink -->
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />

<None Include="$(RepoRoot)icon.png" Link="icon.png" Pack="true" PackagePath="." Visible="false" />
</ItemGroup>

<!-- ###### NUGET END ################ -->
</Project>
4 changes: 4 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ItemGroup>
<PackageVersion Include="Aspire.Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0-preview.7.24251.11" />
<PackageVersion Include="Azure.AI.FormRecognizer" Version="4.1.0" />
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.1" />
<PackageVersion Include="Azure.Identity" Version="1.11.2" />
<PackageVersion Include="Azure.Search.Documents" Version="11.5.1" />
<PackageVersion Include="Azure.Storage.Blobs" Version="12.19.1" />
Expand All @@ -19,6 +20,7 @@
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.AzureAppConfiguration" Version="7.2.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
Expand All @@ -29,6 +31,8 @@
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.TraceSource" Version="8.0.0" />
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="0.22.0-preview.24179.1" />
<PackageVersion Include="Microsoft.KernelMemory.Core" Version="0.50.240504.7" />
<PackageVersion Include="Microsoft.KernelMemory.Service.AspNetCore" Version="0.50.240504.7" />
<PackageVersion Include="MongoDB.Driver.GridFS" Version="2.25.0" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
9 changes: 0 additions & 9 deletions KernelMemory.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{7BA7F1B2-1
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{0A43C65C-6007-4BB4-B3FE-8D439FC91841}"
ProjectSection(SolutionItems) = preProject
examples\Directory.Build.props = examples\Directory.Build.props
examples\README.md = examples\README.md
EndProjectSection
EndProject
Expand Down Expand Up @@ -261,13 +260,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TikToken", "extensions\TikT
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TikToken.UnitTests", "extensions\TikToken\TikToken.UnitTests\TikToken.UnitTests.csproj", "{8ADA17CD-B779-4817-B10A-E9D7B019088D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{2165A553-E07E-4FF7-90DA-3F3643EA690D}"
ProjectSection(SolutionItems) = preProject
infra\dotnet\code-analysis.props = infra\dotnet\code-analysis.props
infra\dotnet\icon.png = infra\dotnet\icon.png
infra\dotnet\nuget-package.props = infra\dotnet\nuget-package.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SQLServer", "extensions\SQLServer\SQLServer\SQLServer.csproj", "{B9BE1099-F78F-4A5F-A897-BF2C75E19C57}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elasticsearch", "extensions\Elasticsearch\Elasticsearch\Elasticsearch.csproj", "{2E10420F-BF96-411C-8FE0-F6268F2EEB67}"
Expand Down Expand Up @@ -587,7 +579,6 @@ Global
{28534545-CB39-446A-9EB9-A5ABBFE0CFD3} = {0A43C65C-6007-4BB4-B3FE-8D439FC91841}
{91757AC4-4FE3-40FE-96D6-1DDEDFB4A830} = {155DA079-E267-49AF-973A-D1D44681970F}
{8ADA17CD-B779-4817-B10A-E9D7B019088D} = {3C17F42B-CFC8-4900-8CFB-88936311E919}
{2165A553-E07E-4FF7-90DA-3F3643EA690D} = {B488168B-AD86-4CC5-9D89-324B6EB743D9}
{B9BE1099-F78F-4A5F-A897-BF2C75E19C57} = {155DA079-E267-49AF-973A-D1D44681970F}
{2E10420F-BF96-411C-8FE0-F6268F2EEB67} = {155DA079-E267-49AF-973A-D1D44681970F}
{C5E6B28C-F54D-423D-954D-A9EAEFB89732} = {3C17F42B-CFC8-4900-8CFB-88936311E919}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@
<PackageReference Include="Microsoft.SemanticKernel.Abstractions" />
</ItemGroup>

<Import Project="../../../infra/dotnet/code-analysis.props" />

<Import Project="../../../infra/dotnet/nuget-package.props" />

<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Microsoft.KernelMemory.SemanticKernelPlugin</PackageId>
<Product>Memory Plugin for Semantic Kernel</Product>
<Description>Kernel Memory Plugin allows to use Kernel Memory Service as a Semantic Kernel plugin, to index and query any data and documents, using LLM and natural language, tracking sources and showing citations.</Description>
<PackageTags>Copilot, Plugin, Memory, RAG, Kernel Memory, Semantic Memory, Episodic Memory, Declarative Memory, AI, Artificial Intelligence, Embeddings, Vector DB, Vector Search, Memory DB, ETL</PackageTags>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions clients/dotnet/WebClient/WebClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
<ProjectReference Include="..\..\..\service\Abstractions\Abstractions.csproj" />
</ItemGroup>

<Import Project="../../../infra/dotnet/code-analysis.props" />

<Import Project="../../../infra/dotnet/nuget-package.props" />

<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Microsoft.KernelMemory.WebClient</PackageId>
<Product>Kernel Memory Web Client</Product>
<Description>Kernel Memory Web Client allows to connect to Kernel Memory Web Service to index and query any data and documents, using LLM and natural language, tracking sources and showing citations.</Description>
<PackageTags>Copilot, Plugin, Memory, RAG, Kernel Memory, Semantic Memory, Semantic Kernel, Episodic Memory, Declarative Memory, AI, Artificial Intelligence, Embeddings, Vector DB, Vector Search, Memory DB, ETL</PackageTags>
<DocumentationFile>bin/$(Configuration)/$(TargetFramework)/$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion examples/001-dotnet-WebClient/001-dotnet-WebClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1861;</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1861;CS1591;IDE1006;</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;IDE1006;</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);CA1050;CA1859;CA2000;</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA1859;CA2000;CS1591;</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);KMEXP00;CA1050;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;SKEXP0001;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);SKEXP0001;SKEXP0010;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA2000;CA1707;CA1303;CA2007;CA1724;CA1861;CA1859;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA1303;CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA1050;CA1303;CS4014;CA1861;</NoWarn>
</PropertyGroup>

Expand Down
Loading
Loading