Skip to content

Commit

Permalink
Sync namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dstenroejl committed Dec 20, 2024
1 parent 7a1230d commit 6409870
Show file tree
Hide file tree
Showing 24 changed files with 57 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

using Energinet.DataHub.Core.App.WebApp.Extensions.Builder;
using Energinet.DataHub.Core.FunctionApp.TestCommon.Configuration;
using Energinet.DataHub.ProcessManager.Components.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Components.Extensions.Options;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using ProcessManager.Components.Extensions.DependencyInjection;
using ProcessManager.Components.Extensions.Options;

namespace Energinet.DataHub.ProcessManager.Components.Tests.Fixtures;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using FluentAssertions;
using Microsoft.Azure.Databricks.Client;
using Microsoft.Azure.Databricks.Client.Models;
using Moq;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Databricks.Jobs.Model;
using Xunit;

namespace Energinet.DataHub.ProcessManager.Components.Tests.Unit.Databricks.Jobs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Diagnostics.HealthChecks;
using Energinet.DataHub.ProcessManager.Components.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Components.Extensions.Options;
using FluentAssertions;
using FluentAssertions.Execution;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Options;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Diagnostics.HealthChecks;
using ProcessManager.Components.Extensions.DependencyInjection;
using ProcessManager.Components.Extensions.Options;
using Xunit;

namespace Energinet.DataHub.ProcessManager.Components.Tests.Unit.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Microsoft.Azure.Databricks.Client;
using Microsoft.Azure.Databricks.Client.Models;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace ProcessManager.Components.Databricks.Jobs;
namespace Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;

internal class DatabricksJobsClient(
IJobsApi jobsApi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using ProcessManager.Components.Databricks.Jobs.Model;

namespace ProcessManager.Components.Databricks.Jobs;
// Copyright 2020 Energinet DataHub A/S
//
// Licensed under the Apache License, Version 2.0 (the "License2");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;

public interface IDatabricksJobsClient
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

namespace ProcessManager.Components.Databricks.Jobs.Model;
namespace Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;

/// <summary>
/// The run id of a Databricks job execution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

namespace ProcessManager.Components.Databricks.Jobs.Model;
namespace Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;

/// <summary>
/// The converted status of a Databricks job execution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Microsoft.Azure.Databricks.Client;
using Microsoft.Extensions.Diagnostics.HealthChecks;

namespace ProcessManager.Components.Diagnostics.HealthChecks;
namespace Energinet.DataHub.ProcessManager.Components.Diagnostics.HealthChecks;

/// <summary>
/// This health check verifies that we can reach the Databricks Jobs API of a workspace.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Extensions.DependencyInjection;
using Microsoft.Azure.Databricks.Client;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using ProcessManager.Components.Diagnostics.HealthChecks;
using ProcessManager.Components.Extensions.DependencyInjection;

namespace ProcessManager.Components.Extensions.Builder;
namespace Energinet.DataHub.ProcessManager.Components.Extensions.Builder;

/// <summary>
/// Health check builder extensions to be used from <see cref="DatabricksWorkspaceExtensions"/>.
Expand All @@ -31,7 +31,7 @@ internal static class DatabricksHealthCheckBuilderExtensions
/// </summary>
/// <remarks>
/// If your application needs to access multiple Databricks workspaces, use the overloaded
/// method <see cref="DatabricksHealthCheckBuilderExtensions.AddDatabricksJobsApi(IHealthChecksBuilder, string, string, IEnumerable{string}?)"/>
/// method <see cref="AddDatabricksJobsApi(IHealthChecksBuilder, string, string, IEnumerable{string}?)"/>
/// that allows you to specify the "service key".
/// </remarks>
/// <param name="builder">The health checks builder.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Extensions.Builder;
using Energinet.DataHub.ProcessManager.Components.Extensions.Options;
using Microsoft.Azure.Databricks.Client;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Extensions.Builder;
using ProcessManager.Components.Extensions.Options;

namespace ProcessManager.Components.Extensions.DependencyInjection;
namespace Energinet.DataHub.ProcessManager.Components.Extensions.DependencyInjection;

/// <summary>
/// Extension methods for <see cref="IServiceCollection"/>
Expand All @@ -43,7 +43,7 @@ public static IServiceCollection AddDatabricksJobs(this IServiceCollection servi
.BindConfiguration(DatabricksWorkspaceOptions.SectionName)
.ValidateDataAnnotations();

serviceCollection.AddSingleton<DatabricksClient>(sp =>
serviceCollection.AddSingleton(sp =>
{
var options = sp.GetRequiredService<IOptions<DatabricksWorkspaceOptions>>().Value;
return DatabricksClient.CreateClient(options.BaseUrl, options.Token);
Expand Down Expand Up @@ -82,7 +82,7 @@ public static IServiceCollection AddDatabricksJobs(this IServiceCollection servi
.BindConfiguration(configSectionPath)
.ValidateDataAnnotations();

serviceCollection.AddKeyedSingleton<DatabricksClient>(serviceKey: configSectionPath, (sp, key) =>
serviceCollection.AddKeyedSingleton(serviceKey: configSectionPath, (sp, key) =>
{
var snapshot = sp.GetRequiredService<IOptionsSnapshot<DatabricksWorkspaceOptions>>();
var options = snapshot.Get(configSectionPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

using System.ComponentModel.DataAnnotations;

namespace ProcessManager.Components.Extensions.Options;
namespace Energinet.DataHub.ProcessManager.Components.Extensions.Options;

public class DatabricksWorkspaceOptions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
using Energinet.DataHub.Core.Messaging.Communication.Extensions.Options;
using Energinet.DataHub.Core.TestCommon.Diagnostics;
using Energinet.DataHub.ProcessManagement.Core.Infrastructure.Extensions.Options;
using Energinet.DataHub.ProcessManager.Components.Extensions.Options;
using Energinet.DataHub.ProcessManager.Core.Tests.Fixtures;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.Options;
using ProcessManager.Components.Extensions.Options;
using Xunit.Abstractions;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Tests.Fixtures;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1.Activities.CalculationStep;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
// limitations under the License.

using Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationInstance;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1.Activities.CalculationStep;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
// limitations under the License.

using Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationInstance;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1.Activities;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1.Activities.CalculationStep;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1.Model;
using Microsoft.Azure.Functions.Worker;
using Microsoft.DurableTask;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_023_027.V1.Model;
using NodaTime;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1;
namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027;

internal class SearchCalculationHandler(
IOrchestrationInstanceQueries queries)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_023_027;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.Functions.Worker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities.CalculationStep;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
// limitations under the License.

using Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationInstance;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_023_027.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Mappers;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.DependencyInjection;
using ProcessManager.Components.Databricks.Jobs;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities.CalculationStep;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using Microsoft.Azure.Functions.Worker;
using NodaTime;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities.CalculationStep;
namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities;

internal class TransitionStepToRunningActivity_Brs_023_027_V1(
IClock clock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using Microsoft.Azure.Functions.Worker;
using NodaTime;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities.CalculationStep;
namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities;

internal class TransitionStepToTerminatedActivity_Brs_023_027_V1(
IClock clock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

using Energinet.DataHub.ProcessManagement.Core.Domain.OrchestrationInstance;
using Energinet.DataHub.ProcessManagement.Core.Infrastructure.Extensions.DurableTask;
using Energinet.DataHub.ProcessManager.Components.Databricks.Jobs.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_023_027.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Activities.CalculationStep;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1.Model;
using Microsoft.Azure.Functions.Worker;
using Microsoft.DurableTask;
using ProcessManager.Components.Databricks.Jobs.Model;

namespace Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1;

Expand Down
3 changes: 2 additions & 1 deletion source/ProcessManager.Orchestrations/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@
using Energinet.DataHub.ProcessManagement.Core.Infrastructure.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManagement.Core.Infrastructure.Extensions.Startup;
using Energinet.DataHub.ProcessManagement.Core.Infrastructure.Telemetry;
using Energinet.DataHub.ProcessManager.Components.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_021.ElectricalHeatingCalculation.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_021.ForwardMeteredData.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_023_027.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Abstractions.Processes.BRS_026.V1.Model;
using Energinet.DataHub.ProcessManager.Orchestrations.Extensions.DependencyInjection;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ElectricalHeatingCalculation.V1;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_021.ForwardMeteredData.V1;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_023_027.V1;
using Energinet.DataHub.ProcessManager.Orchestrations.Processes.BRS_026.V1;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using ProcessManager.Components.Extensions.DependencyInjection;

var host = new HostBuilder()
.ConfigureFunctionsWebApplication()
Expand Down

0 comments on commit 6409870

Please sign in to comment.