Skip to content

Commit

Permalink
116: Moved common packages to SOFTURE project
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmatys committed Sep 21, 2024
1 parent 7586af0 commit 7c25f95
Show file tree
Hide file tree
Showing 31 changed files with 29 additions and 279 deletions.
4 changes: 2 additions & 2 deletions API/ASSISTENTE.API/ASSISTENTE.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<PackageReference Include="FastEndpoints.Swagger" Version="5.26.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.1"/>
<PackageReference Include="NSwag.AspNetCore" Version="14.0.7" />
<PackageReference Include="SOFTURE.Common.Authentication" Version="0.0.10" />
<PackageReference Include="SOFTURE.Common.Observability" Version="0.0.10" />
<PackageReference Include="Swashbuckle.AspNetCore.ReDoc" Version="6.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ASSISTENTE.Common.Authentication\ASSISTENTE.Common.Authentication.csproj" />
<ProjectReference Include="..\ASSISTENTE.Common.Observability\ASSISTENTE.Common.Observability.csproj" />
<ProjectReference Include="..\ASSISTENTE.Contract.Requests.Internal\ASSISTENTE.Contract.Requests.Internal.csproj" />
<ProjectReference Include="..\ASSISTENTE.Module\ASSISTENTE.Module.csproj" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions API/ASSISTENTE.API/ApiSettings.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ASSISTENTE.Client.Internal.Settings;
using ASSISTENTE.Common.Authentication.Settings;
using ASSISTENTE.Common.Observability.Settings;
using ASSISTENTE.Infrastructure.Embeddings.Settings;
using ASSISTENTE.Infrastructure.LLM.Settings;
using ASSISTENTE.Infrastructure.Qdrant.Settings;
using ASSISTENTE.Module;
using ASSISTENTE.Persistence.Configuration.Settings;
using SOFTURE.Common.Authentication.Settings;
using SOFTURE.Common.Logging.Settings;
using SOFTURE.Common.Observability.Settings;
using SOFTURE.MessageBroker.Rabbit.Settings;

namespace ASSISTENTE.API;
Expand Down
8 changes: 4 additions & 4 deletions API/ASSISTENTE.API/Common/Extensions/CommonExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using ASSISTENTE.Common.Authentication;
using ASSISTENTE.Common.Authentication.Settings;
using ASSISTENTE.Common.Observability;
using ASSISTENTE.Common.Observability.Settings;
using SOFTURE.Common.Authentication;
using SOFTURE.Common.Authentication.Settings;
using SOFTURE.Common.Correlation;
using SOFTURE.Common.Logging;
using SOFTURE.Common.Logging.Settings;
using SOFTURE.Common.Observability;
using SOFTURE.Common.Observability.Settings;
using SOFTURE.MessageBroker.Rabbit;
using SOFTURE.MessageBroker.Rabbit.Settings;
using SOFTURE.Settings.Extensions;
Expand Down
2 changes: 1 addition & 1 deletion API/ASSISTENTE.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ASSISTENTE.API;
using ASSISTENTE.API.Common.Extensions;
using ASSISTENTE.Common.Observability;
using SOFTURE.Common.HealthCheck;
using SOFTURE.Common.Observability;
using SOFTURE.Settings.Extensions;

var configuration = new ConfigurationBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace ASSISTENTE.Application.Handlers.Bases;

public abstract class QuestionCommandBase<TCommand>(
ILogger logger,
ILogger<TCommand> logger,
IAssistenteClientInternal clientInternal) : IRequestHandler<TCommand, Result>
where TCommand : IRequest<Result>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static LearnCommand Create()
public class LearnCommandHandler(
IFileParser fileParser,
IKnowledgeService knowledgeService,
ILogger logger)
ILogger<LearnCommandHandler> logger)
: IRequestHandler<LearnCommand, Result>
{
public async Task<Result> Handle(LearnCommand request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class CreateEmbeddingsCommandHandler(
IQuestionOrchestrator questionOrchestrator,
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger) : QuestionCommandBase<CreateEmbeddingsCommand>(logger, clientInternal)
ILogger<CreateEmbeddingsCommand> logger) : QuestionCommandBase<CreateEmbeddingsCommand>(logger, clientInternal)
{
protected override async Task<Result> HandleAsync(Question question)
=> await questionOrchestrator.CreateEmbedding(question);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static CreateQuestionCommand Create(CreateQuestionRequest payload)

public class CreateQuestionCommandHandler(
IQuestionOrchestrator questionOrchestrator,
ILogger logger)
ILogger<CreateQuestionCommand> logger)
: IRequestHandler<CreateQuestionCommand, Result>
{
public async Task<Result> Handle(CreateQuestionCommand request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class FindFilesCommandHandler(
IQuestionOrchestrator questionOrchestrator,
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger) : QuestionCommandBase<FindFilesCommand>(logger, clientInternal)
ILogger<FindFilesCommand> logger) : QuestionCommandBase<FindFilesCommand>(logger, clientInternal)
{
protected override async Task<Result> HandleAsync(Question question)
=> await questionOrchestrator.FindFiles(question);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class FindResourcesCommandHandler(
IQuestionOrchestrator questionOrchestrator,
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger) : QuestionCommandBase<FindResourcesCommand>(logger, clientInternal)
ILogger<FindResourcesCommand> logger) : QuestionCommandBase<FindResourcesCommand>(logger, clientInternal)
{
protected override async Task<Result> HandleAsync(Question question)
=> await questionOrchestrator.FindResources(question);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GenerateAnswerCommandHandler(
IQuestionOrchestrator questionOrchestrator,
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger) : QuestionCommandBase<GenerateAnswerCommand>(logger, clientInternal)
ILogger<GenerateAnswerCommand> logger) : QuestionCommandBase<GenerateAnswerCommand>(logger, clientInternal)
{
protected override async Task<Result> HandleAsync(Question question)
=> await questionOrchestrator.GenerateAnswer(question);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static NotifyQuestionReadinessCommand Create(QuestionId questionId)
public class NotifyQuestionReadinessCommandHandler(
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger)
ILogger<NotifyQuestionReadinessCommand> logger)
: IRequestHandler<NotifyQuestionReadinessCommand, Result>
{
public async Task<Result> Handle(NotifyQuestionReadinessCommand request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class ResolveQuestionCommandHandler(
IQuestionOrchestrator questionOrchestrator,
IQuestionRepository questionRepository,
IAssistenteClientInternal clientInternal,
ILogger logger) : QuestionCommandBase<ResolveContextCommand>(logger, clientInternal)
ILogger<ResolveContextCommand> logger) : QuestionCommandBase<ResolveContextCommand>(logger, clientInternal)
{
protected override async Task<Result> HandleAsync(Question question)
=> await questionOrchestrator.ResolveContext(question);
Expand Down

This file was deleted.

33 changes: 0 additions & 33 deletions API/ASSISTENTE.Common.Authentication/DependencyInjection.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

63 changes: 0 additions & 63 deletions API/ASSISTENTE.Common.Observability/DependencyInjection.cs

This file was deleted.

6 changes: 0 additions & 6 deletions API/ASSISTENTE.Common.Observability/DiagnosticConfig.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

50 changes: 0 additions & 50 deletions API/ASSISTENTE.Common.Resilience/DependencyInjection.cs

This file was deleted.

5 changes: 1 addition & 4 deletions API/ASSISTENTE.UI.Http/ASSISTENTE.UI.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ASSISTENTE.Common.Resilience\ASSISTENTE.Common.Resilience.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.9.1" />
<PackageReference Include="SOFTURE.Common.Correlation" Version="0.0.5" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 7c25f95

Please sign in to comment.