-
Notifications
You must be signed in to change notification settings - Fork 7
Bump Semantic Kernel to 1.74.0 and update deps #188
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| # Project Guidelines — ENMARCHA | ||
|
|
||
| ENMARCHA is a modular .NET NuGet package library that accelerates .NET development with enterprise-grade utilities for AI, Semantic Kernel, data, and cloud scenarios. The AI layer is branded **ENGENIA**. | ||
|
|
||
| ## Architecture | ||
|
|
||
| **Abstractions + Implementation separation**: Every feature area follows a strict split: | ||
| - `Encamina.Enmarcha.{Feature}.Abstractions` — interfaces, base records/classes, options. Targets `netstandard2.1` for broad compatibility. | ||
| - `Encamina.Enmarcha.{Feature}.{Provider}` — concrete implementations (e.g., `AI.OpenAI.Azure`, `Data.Cosmos`, `Email.MailKit`). Targets `net10.0`. | ||
|
|
||
| **Namespace conventions**: | ||
| - Source: `Encamina.Enmarcha.{FeatureArea}{.SubArea}` matching the project name. | ||
| - DI extension methods must live in `namespace Microsoft.Extensions.DependencyInjection;` for discoverability. | ||
| - Tests: `Encamina.Enmarcha.{FeatureArea}.Tests`. | ||
|
|
||
| **Key directories**: | ||
| - `src/` — All library projects. | ||
| - `tst/` — All test projects. | ||
| - `samples/` — Example apps demonstrating module usage. | ||
|
|
||
| ## Build and Test | ||
|
|
||
| - **.NET SDK 10.0** (`global.json` — `rollForward: latestFeature`). | ||
| - Build: `dotnet build Enmarcha.sln` | ||
| - Test: `dotnet test Enmarcha.sln` | ||
| - Local NuGet publish: `.\PublishToLocal.ps1` | ||
| - Current version set in `Directory.Build.props` `VersionPrefix`. | ||
|
|
||
| ## Code Style | ||
|
|
||
| StyleCop Analyzers and `.editorconfig` enforce style at build time. Key rules: | ||
|
|
||
| - **Always use `var`** (all three var preferences are `:warning`). | ||
| - **File-scoped namespaces** (`namespace X;` not `namespace X { }`). | ||
| - **4-space indentation**, UTF-8 with BOM, CRLF line endings. | ||
| - **Expression-bodied members** encouraged for trivial implementations. | ||
| - **Modern C# patterns**: pattern matching, switch expressions, null-check over type-check. | ||
| - **XML documentation is mandatory** on all public APIs (`GenerateDocumentationFile` is enabled; `CS1591` is only suppressed in test projects). | ||
| - **Nullable reference types enabled** globally — annotate all nullability. | ||
| - **Implicit usings enabled** — don't add `using System;` etc. | ||
| - **`sealed`** on final implementation classes and test classes. | ||
| - **`init`** properties on configuration/options types for immutability. | ||
|
|
||
| ## Conventions | ||
|
|
||
| ### Dependency Injection | ||
|
|
||
| Expose services via `IServiceCollectionExtensions.cs` in an `Extensions/` folder: | ||
|
|
||
| ```csharp | ||
| namespace Microsoft.Extensions.DependencyInjection; | ||
|
|
||
| public static class IServiceCollectionExtensions | ||
| { | ||
| public static IServiceCollection AddFeatureName(this IServiceCollection services, IConfiguration configuration) | ||
| { | ||
| services.AddOptions<FeatureOptions>() | ||
| .Bind(configuration.GetSection(nameof(FeatureOptions))) | ||
| .ValidateDataAnnotations() | ||
| .ValidateOnStart(); | ||
|
|
||
| services.TryAddSingleton<IFeature, FeatureImpl>(); | ||
| return services; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Provide overloads accepting both `IConfiguration` and `Action<TOptions>`. Return `IServiceCollection` for chaining. | ||
|
|
||
| ### Options / Configuration | ||
|
|
||
| - Use **records** or classes with `init` properties and **Data Annotations** for validation (`[Required]`, `[Url]`, custom validators like `[NotEmptyOrWhitespace]`, `[RequiredIf]`). | ||
| - Suffix: `*Options` (e.g., `SemanticTextSplitterOptions`). | ||
| - Base types in Abstractions, sealed concrete types in implementations. | ||
|
|
||
| ### Interfaces | ||
|
|
||
| - `I` prefix (`ITextSplitter`, `ICognitiveService`). | ||
| - Keep interfaces focused and minimal; compose via inheritance (`ICognitiveService : INameable`). | ||
|
|
||
| ### Project internal structure | ||
|
|
||
| ``` | ||
| src/Encamina.Enmarcha.{Feature}/ | ||
| ├── Extensions/ | ||
| │ ├── IServiceCollectionExtensions.cs | ||
| │ └── Resources/ (resx for exception/validation messages) | ||
| ├── Internals/ (implementation details) | ||
| ├── Options/ (configuration classes) | ||
| ├── {PublicTypes}.cs | ||
| └── README.md | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| - **xUnit** with parallel execution enabled. | ||
| - Test project: `Encamina.Enmarcha.{Feature}.Tests` in `tst/`. | ||
| - Test class: `{ClassUnderTest}Tests` (sealed). | ||
| - Test method: `{Method}_{Scenario}_{Expected}` (e.g., `Calculate_Percentile_Succeeds`). | ||
| - Use `[Theory]`/`[InlineData]` for parameterized tests, `[Fact]` for single-case. | ||
| - Collection fixtures via `ICollectionFixture<T>` for shared state. | ||
| - Tests suppress `CS1591` and `SA1600` — XML docs not required in tests. | ||
|
|
||
| ### Versioning | ||
|
|
||
| Semantic Versioning. Breaking changes go in major versions with explicit `### Breaking Changes` in `CHANGELOG.md`. See [CONTRIBUTING.md](../CONTRIBUTING.md) for the full contribution workflow. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "MD025": false, | ||
| "MD013": false, | ||
| "MD024": false, | ||
| "MD036": false, | ||
| "MD033": false, | ||
| "MD060": false, | ||
| "MD059": false, | ||
| "MD040": false | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.