Skip to content

Commit

Permalink
Consolidate to one Echo engine
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Oct 9, 2024
1 parent 275fe7d commit bb06c3f
Show file tree
Hide file tree
Showing 28 changed files with 3,437 additions and 630 deletions.
32 changes: 10 additions & 22 deletions Serval.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Translation.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.DataFiles", "src\Serval\src\Serval.DataFiles\Serval.DataFiles.csproj", "{4375A7BF-E3CE-4785-91E3-2ED6FCEB074F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EchoTranslationEngine", "src\Echo\src\EchoTranslationEngine\EchoTranslationEngine.csproj", "{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.ApiServer.IntegrationTests", "src\Serval\test\Serval.ApiServer.IntegrationTests\Serval.ApiServer.IntegrationTests.csproj", "{0C3DF75B-B022-4EFC-882C-F276F1EC8435}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.E2ETests", "src\Serval\test\Serval.E2ETests\Serval.E2ETests.csproj", "{1F020042-D7B8-4541-9691-26ECFD1FFC73}"
Expand All @@ -48,10 +46,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SIL.DataAccess.Tests", "src
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serval.Shared.Tests", "src\Serval\test\Serval.Shared.Tests\Serval.Shared.Tests.csproj", "{0E220C65-AA88-450E-AFB2-844E49060B3F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Echo", "Echo", "{53B18D34-B7C7-4B91-BCB0-1021170DFC65}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{BE90915F-E16D-479C-9568-22A08F0FD8F9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serval", "Serval", "{6D20F76D-9A0E-44AC-8754-B4291C75D25B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{25CDB05B-4E24-4A6E-933E-1E0BEC97D74D}"
Expand Down Expand Up @@ -94,11 +88,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C1EF85B4-F2C
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serval.WordAlignment", "src\Serval\src\Serval.WordAlignment\Serval.WordAlignment.csproj", "{F07B5541-4BA4-4BF8-AE1A-B44BDDCEB354}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Echo", "Echo", "{22670005-758A-4595-8951-430AB7B7FE58}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Echo", "Echo", "{D201886D-9299-4758-80E8-694DBCF8DF93}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{89E0A893-497E-4A2A-AA50-6E3BED754301}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0904BA95-D5BF-4AC2-A919-20A785EF45F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EchoWordAlignmentEngine", "src\Echo\src\EchoWordAlignmentEngine\EchoWordAlignmentEngine.csproj", "{82544458-AC7F-44BF-9364-F1DDBADB8EBF}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EchoEngine", "src\Echo\src\EchoEngine\EchoEngine.csproj", "{929FF600-8C7E-4498-A2A3-5534F3A3481E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -146,10 +140,6 @@ Global
{4375A7BF-E3CE-4785-91E3-2ED6FCEB074F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4375A7BF-E3CE-4785-91E3-2ED6FCEB074F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4375A7BF-E3CE-4785-91E3-2ED6FCEB074F}.Release|Any CPU.Build.0 = Release|Any CPU
{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC}.Release|Any CPU.Build.0 = Release|Any CPU
{0C3DF75B-B022-4EFC-882C-F276F1EC8435}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C3DF75B-B022-4EFC-882C-F276F1EC8435}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C3DF75B-B022-4EFC-882C-F276F1EC8435}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -198,10 +188,10 @@ Global
{F07B5541-4BA4-4BF8-AE1A-B44BDDCEB354}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F07B5541-4BA4-4BF8-AE1A-B44BDDCEB354}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F07B5541-4BA4-4BF8-AE1A-B44BDDCEB354}.Release|Any CPU.Build.0 = Release|Any CPU
{82544458-AC7F-44BF-9364-F1DDBADB8EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{82544458-AC7F-44BF-9364-F1DDBADB8EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82544458-AC7F-44BF-9364-F1DDBADB8EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82544458-AC7F-44BF-9364-F1DDBADB8EBF}.Release|Any CPU.Build.0 = Release|Any CPU
{929FF600-8C7E-4498-A2A3-5534F3A3481E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{929FF600-8C7E-4498-A2A3-5534F3A3481E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{929FF600-8C7E-4498-A2A3-5534F3A3481E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{929FF600-8C7E-4498-A2A3-5534F3A3481E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -217,13 +207,11 @@ Global
{8FC30758-37FC-4819-805D-8EFF3DEDF05F} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{539598C5-8634-4273-8714-A684622DDCFC} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{4375A7BF-E3CE-4785-91E3-2ED6FCEB074F} = {25CDB05B-4E24-4A6E-933E-1E0BEC97D74D}
{A9D08CA2-3CF7-4BB7-A47F-5A567FFDB2CC} = {BE90915F-E16D-479C-9568-22A08F0FD8F9}
{0C3DF75B-B022-4EFC-882C-F276F1EC8435} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{1F020042-D7B8-4541-9691-26ECFD1FFC73} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{63E4D71B-11BE-4D68-A876-5B1B5F0A4C88} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{71151518-8774-44D0-8E69-D77FA447BEFA} = {BA044B98-3136-4FDE-B90F-B0975758C07F}
{0E220C65-AA88-450E-AFB2-844E49060B3F} = {3E753B99-7C31-42AC-B02E-012B802F58DB}
{BE90915F-E16D-479C-9568-22A08F0FD8F9} = {53B18D34-B7C7-4B91-BCB0-1021170DFC65}
{25CDB05B-4E24-4A6E-933E-1E0BEC97D74D} = {6D20F76D-9A0E-44AC-8754-B4291C75D25B}
{3E753B99-7C31-42AC-B02E-012B802F58DB} = {6D20F76D-9A0E-44AC-8754-B4291C75D25B}
{92805246-5285-4F0A-9BF8-6EE4A027A41B} = {33E6965E-5A58-4C6F-882E-F17C8E88A3FF}
Expand All @@ -240,9 +228,9 @@ Global
{A78D900F-AE52-436C-88CE-A22EAEDECD91} = {9125C013-4F15-4761-BCD2-070524986737}
{C1EF85B4-F2CD-407D-904D-BAC1BCE3A64C} = {A78D900F-AE52-436C-88CE-A22EAEDECD91}
{F07B5541-4BA4-4BF8-AE1A-B44BDDCEB354} = {C1EF85B4-F2CD-407D-904D-BAC1BCE3A64C}
{22670005-758A-4595-8951-430AB7B7FE58} = {9125C013-4F15-4761-BCD2-070524986737}
{89E0A893-497E-4A2A-AA50-6E3BED754301} = {22670005-758A-4595-8951-430AB7B7FE58}
{82544458-AC7F-44BF-9364-F1DDBADB8EBF} = {89E0A893-497E-4A2A-AA50-6E3BED754301}
{D201886D-9299-4758-80E8-694DBCF8DF93} = {9125C013-4F15-4761-BCD2-070524986737}
{0904BA95-D5BF-4AC2-A919-20A785EF45F5} = {D201886D-9299-4758-80E8-694DBCF8DF93}
{929FF600-8C7E-4498-A2A3-5534F3A3481E} = {0904BA95-D5BF-4AC2-A919-20A785EF45F5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9F18C25E-E140-43C3-B177-D562E1628370}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SIL.ServiceToolkit.Services;
namespace EchoEngine;

public class BackgroundTaskQueue
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace SIL.ServiceToolkit.Services;
namespace EchoEngine;

public class BackgroundTaskService(
BackgroundTaskQueue taskQueue,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Serval.Health.V1;

namespace EchoTranslationEngine;
namespace EchoEngine;

public class HealthServiceV1(HealthCheckService healthCheckService) : HealthApi.HealthApiBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
using Serval.Translation.V1;
using Serval.WordAlignment.V1;

WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddGrpcClient<WordAlignmentPlatformApi.WordAlignmentPlatformApiClient>(o =>
builder.Services.AddGrpcClient<TranslationPlatformApi.TranslationPlatformApiClient>(o =>
{
o.Address = new Uri(builder.Configuration.GetConnectionString("TranslationPlatformApi")!);
});
builder.Services.AddGrpcClient<WordAlignmentPlatformApi.WordAlignmentPlatformApiClient>(o =>
{
o.Address = new Uri(builder.Configuration.GetConnectionString("WordAlignmentPlatformApi")!);
});

builder.Services.AddGrpc();

builder.Services.AddHostedService<BackgroundTaskService>();
Expand All @@ -20,7 +28,9 @@
// Configure the HTTP request pipeline.
app.UseHttpsRedirection();

app.MapGrpcService<TranslationEngineServiceV1>();
app.MapGrpcService<WordAlignmentEngineServiceV1>();

app.MapGrpcService<HealthServiceV1>();

app.Run();
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace EchoTranslationEngine;
using Serval.Translation.V1;

namespace EchoEngine;

public class TranslationEngineServiceV1(BackgroundTaskQueue taskQueue) : TranslationEngineApi.TranslationEngineApiBase
{
Expand Down
6 changes: 6 additions & 0 deletions src/Echo/src/EchoEngine/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
global using System.Threading.Channels;
global using Bugsnag.AspNet.Core;
global using EchoEngine;
global using Google.Protobuf.WellKnownTypes;
global using Grpc.Core;
global using Microsoft.Extensions.Diagnostics.HealthChecks;
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace EchoWordAlignmentEngine;
using Serval.WordAlignment.V1;

namespace EchoEngine;

public class WordAlignmentEngineServiceV1(BackgroundTaskQueue taskQueue)
: WordAlignmentEngineApi.WordAlignmentEngineApiBase
Expand Down
File renamed without changes.
26 changes: 0 additions & 26 deletions src/Echo/src/EchoTranslationEngine/Program.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Echo/src/EchoTranslationEngine/Usings.cs

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions src/Echo/src/EchoWordAlignmentEngine/HealthServiceV1.cs

This file was deleted.

7 changes: 0 additions & 7 deletions src/Echo/src/EchoWordAlignmentEngine/Usings.cs

This file was deleted.

16 changes: 0 additions & 16 deletions src/Echo/src/EchoWordAlignmentEngine/appsettings.Development.json

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/Echo/src/EchoWordAlignmentEngine/appsettings.Staging.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/Echo/src/EchoWordAlignmentEngine/appsettings.json

This file was deleted.

1 change: 1 addition & 0 deletions src/Serval/src/Serval.ApiServer/Serval.ApiServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<ProjectReference Include="..\Serval.Assessment\Serval.Assessment.csproj" />
<ProjectReference Include="..\Serval.DataFiles\Serval.DataFiles.csproj" />
<ProjectReference Include="..\Serval.Translation\Serval.Translation.csproj" />
<ProjectReference Include="..\Serval.WordAlignment\Serval.WordAlignment.csproj" />
<ProjectReference Include="..\Serval.Webhooks\Serval.Webhooks.csproj" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/Serval/src/Serval.ApiServer/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ public void ConfigureServices(IServiceCollection services)
{
cfg.AddTranslationRepositories();
cfg.AddAssessmentRepositories();
cfg.AddWordAlignmentRepositories();
cfg.AddDataFilesRepositories();
cfg.AddWebhooksRepositories();
})
.AddTranslation()
.AddAssessment()
.AddWordAlignment()
.AddDataFiles()
.AddWebhooks();
services.AddTransient<IUrlService, UrlService>();
Expand Down Expand Up @@ -113,6 +115,7 @@ public void ConfigureServices(IServiceCollection services)
{
cfg.AddTranslationConsumers();
cfg.AddAssessmentConsumers();
cfg.AddWordAlignmentConsumers();
cfg.AddDataFilesConsumers();
cfg.AddWebhooksConsumers();
});
Expand Down Expand Up @@ -232,6 +235,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
x.MapControllers();
x.MapServalTranslationServices();
x.MapServalAssessmentServices();
x.MapServalWordAlignmentServices();
x.MapHangfireDashboard();
});

Expand Down
Loading

0 comments on commit bb06c3f

Please sign in to comment.