Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Build and Test 13.0

on:
push:
Expand All @@ -17,5 +17,5 @@ jobs:
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/test-csharp.yml@main
secrets: inherit
with:
temp-version: "12.3.9999"
temp-version: "13.0.9999"
test-arguments: "--filter TestCategory!=Reporting"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build Nightly 12.3
run-name: Version 12.3.${{ github.run_number }}
name: Build Nightly 13.0
run-name: Version 13.0.${{ github.run_number }}

on:
workflow_dispatch:
Expand All @@ -17,7 +17,7 @@ jobs:
LATEST_COMMIT_TIMESPAN: ${{ steps.get-latest-commit-timespan.outputs.LATEST_COMMIT_TIMESPAN}}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand All @@ -43,7 +43,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: 'true'

Expand All @@ -54,14 +54,14 @@ jobs:

- name: define env variables
run: |
echo "APP_VERSION=12.3.${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "APP_VERSION=13.0.${{ github.run_number }}" | Out-File -FilePath $env:GITHUB_ENV -Append

- name: Build
run: |
dotnet build InstallationValidator.sln /p:Version=${{env.APP_VERSION}}

- name: Test
run: dotnet test InstallationValidator.sln --filter TestCategory!=Reporting --no-build -v normal --logger:"html;LogFileName=../testLog_Windows.html"
run: dotnet test InstallationValidator.sln --filter "TestCategory!=Reporting" --no-build -v normal --logger:"html;LogFileName=${{ github.workspace }}/testLog_Windows.html"

- name: Sign InstallationValidator.exe with CodeSignTool
uses: Open-Systems-Pharmacology/Workflows/.github/actions/codesigner-SSL@main
Expand All @@ -71,7 +71,7 @@ jobs:
ES_CREDENTIAL_ID: ${{ secrets.ES_CREDENTIAL_ID }}
ES_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}
with:
file_path: ./src/InstallationValidator/bin/Debug/net472/InstallationValidator.exe
file_path: ./src/InstallationValidator/bin/Debug/net10.0-windows/InstallationValidator.exe

- name: Sign SimulationOutputComparer.exe with CodeSignTool
uses: Open-Systems-Pharmacology/Workflows/.github/actions/codesigner-SSL@main
Expand All @@ -81,7 +81,7 @@ jobs:
ES_CREDENTIAL_ID: ${{ secrets.ES_CREDENTIAL_ID }}
ES_TOTP_SECRET: ${{ secrets.ES_TOTP_SECRET }}
with:
file_path: ./src/SimulationOutputComparer/bin/Debug/net472/SimulationOutputComparer.exe
file_path: ./src/SimulationOutputComparer/bin/Debug/net10.0-windows/SimulationOutputComparer.exe

- name: Create Setup
run: |
Expand All @@ -99,13 +99,13 @@ jobs:

- name: Push test log as artifact
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: testLog_Windows
path: ./testLog*.html

- name: Push nightly installer as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Installation Validator Installer ${{env.APP_VERSION}}
path: setup\deploy\*.msi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
submodules: 'true'

Expand All @@ -24,7 +24,7 @@ jobs:
nuget restore

- name: Build
run: dotnet build InstallationValidator.sln /p:Version=12.3.9999
run: dotnet build InstallationValidator.sln /p:Version=13.0.9999


- name: Cover and report
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-badge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Badge for Nightly Build
on:
workflow_run:
workflows:
- "Build Nightly 12.3"
- "Build Nightly 13.0"
types:
- completed

Expand All @@ -26,4 +26,4 @@ jobs:
badge:
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/nightly-badge.yml@main
with:
nightly-build-workflow: "build-nightly_12.3.yml"
nightly-build-workflow: "build-nightly_13.0.yml"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,5 @@ ModelManifest.xml
# FAKE - F# Make
.fake/
*.ncrunchsolution

.claude/settings.local.json
13 changes: 12 additions & 1 deletion src/InstallationValidator.Core/Assets/Captions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public static string ValidationDescription
public static readonly string IgnoreRemovedCurves= "Ignore removed curves";
public static readonly string ReallyCancelFolderComparison = "Really cancel folder comparison?";
public static readonly string ExclusionList = "Exclusion List";
public static readonly string ExportToPdf = "Export to PDF";
public static readonly string ExportToMarkdown = "Export to Markdown";
}

public static class Logs
Expand Down Expand Up @@ -187,8 +189,13 @@ public static class Reporting
public static readonly string OverallValidationResult = "Overall Validation Result";
public static readonly string FailedValidations = "Failed Validations";
public static readonly string InputConfigurationFolder = "Input Configuration Folder";
public static readonly string StartTime = "Start time";
public static readonly string EndTime = "End time";
public static readonly string BatchRunDuration = "Run Duration";
public static readonly string ValidationResult = "Result of the validation: ";
public static readonly string Yes = "Yes";
public static readonly string No = "No";
public static readonly string OSLabel = "OS";
public static readonly string ValidationResult = "Result of the validation:";
public static readonly string Simulation = "Simulation";
public static readonly string Deviation = "Deviation";
public static readonly string OutputPath = "Output Path";
Expand All @@ -213,6 +220,10 @@ public static string InstallationValidationPerformedIn(string startTime, string

public static string ComparisonFolder(string folderName) => $"{folderName} Folder";

public static string FileWasContainedInFolder(string fileName) => $"{fileName} was contained in folder:";
public static readonly string ButWasMissingInFolder = "but was missing in folder:";
public static string ValidationPerformedIn(string duration) => $"Validation performed in {duration}";

public static string MissingFileValidationMessage(string fileName, string folderContainingFile, string folderWithoutFile) =>
$"{fileName} was contained in folder:{Environment.NewLine}{folderContainingFile}{Environment.NewLine}but was missing in folder:{Environment.NewLine}{folderWithoutFile}";
}
Expand Down
3 changes: 1 addition & 2 deletions src/InstallationValidator.Core/Domain/OperatingSystemInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace InstallationValidator.Core.Domain
public class OperatingSystemInfo
{
private const string WINDOWS_REG_KEY = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion";

public string ComputerName { get; } = Environment.MachineName;
public string Architecture => Environment.Is64BitOperatingSystem ? "x64" : "x32";

Expand Down Expand Up @@ -103,4 +102,4 @@ public bool IsRunningOnVirtualMachine

public bool IsRunningOnTerminalSession => SystemInformation.TerminalServerSession;
}
}
}
38 changes: 22 additions & 16 deletions src/InstallationValidator.Core/InstallationValidator.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<PackageTags>open-systems-pharmacology, ospsuite-components</PackageTags>
Expand All @@ -10,7 +12,7 @@
<OutputPath>bin\$(Configuration)</OutputPath>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>1591</NoWarn>
<Version Condition="'$(Version)' == ''">12.3.0</Version>
<Version Condition="'$(Version)' == ''">13.0.0</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>

Expand All @@ -24,15 +26,23 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="OSPSuite.Assets.Images" Version="12.3.32" />
<PackageReference Include="OSPSuite.Infrastructure" Version="12.3.32" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="12.3.32" />
<PackageReference Include="OSPSuite.Infrastructure.Reporting" Version="12.3.32" />
<PackageReference Include="OSPSuite.Presentation" Version="12.3.32" />
<PackageReference Include="OSPSuite.TeXReporting" Version="3.0.1.1" />
<PackageReference Include="OSPSuite.Utility" Version="4.1.1.1" />
<PackageReference Include="OSPSuite.Core" Version="12.3.32" />
<PackageReference Include="OSPSuite.Assets" Version="12.3.32" />
<PackageReference Include="OSPSuite.Assets.Images" Version="13.0.134" />
<PackageReference Include="DevExpress.Win" Version="25.2.7" />
<PackageReference Include="DevExpress.Win.BonusSkins" Version="25.2.7" />
<PackageReference Include="DevExpress.Win.Charts" Version="25.2.7" />
<PackageReference Include="DevExpress.Win.RichEdit" Version="25.2.7" />
<PackageReference Include="DevExpress.Win.Design" Version="25.2.7" Condition="'$(ExcludeDesigner)' != 'true'" />
<PackageReference Include="OSPSuite.FuncParser" Version="5.0.0.3" />
<PackageReference Include="OSPSuite.Infrastructure" Version="13.0.134" />
<PackageReference Include="OSPSuite.Infrastructure.Castle" Version="13.0.134" />
<PackageReference Include="OSPSuite.Presentation" Version="13.0.134" />
<PackageReference Include="OSPSuite.SimModel" Version="5.0.0.76" />
<PackageReference Include="OSPSuite.Utility" Version="5.0.0.10" />
<PackageReference Include="OSPSuite.Core" Version="13.0.134" />
<PackageReference Include="OSPSuite.Assets" Version="13.0.134" />
<PackageReference Include="QuestPDF" Version="2024.3.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -42,9 +52,5 @@
</None>
</ItemGroup>

<ItemGroup>
<Reference Include="System.Management" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace InstallationValidator.Core.Presentation.DTO
{
public class ReportOptionsDTO
{
public bool ExportToPdf { get; set; } = true;
public bool ExportToMarkdown { get; set; }
}
}
12 changes: 11 additions & 1 deletion src/InstallationValidator.Core/Presentation/MainPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class MainPresenter : AbstractDisposablePresenter<IMainView, IMainPresent
private readonly IInstallationValidatorConfiguration _configuration;
private readonly IValidationReportingTask _validationReportingTask;
private readonly FolderDTO _outputFolderDTO = new FolderDTO(folderMustExist: false);
private readonly ReportOptionsDTO _reportOptionsDTO = new ReportOptionsDTO();
private CancellationTokenSource _cancellationTokenSource;
private bool _validationRunning;

Expand All @@ -40,6 +41,7 @@ public MainPresenter(IMainView view, IDialogCreator dialogCreator, IBatchStarter
_validationReportingTask = validationReportingTask;
_outputFolderDTO.FolderPath = configuration.DefaultOutputPath;
view.BindTo(_outputFolderDTO);
view.BindToReportOptions(_reportOptionsDTO);
}

public void SelectOutputFolder()
Expand Down Expand Up @@ -86,7 +88,7 @@ public async Task<InstallationValidationResult> StartInstallationValidation()
validationResult.RunSummary = runSummary;

this.LogLine(Logs.StartingReport);
await _validationReportingTask.CreateReport(validationResult, _outputFolderDTO.FolderPath, openReport: true);
await _validationReportingTask.CreateReport(validationResult, _outputFolderDTO.FolderPath, new ReportOptions(reportFormatFromDTO(), openReport: true));
this.LogLine();

this.LogLine(Logs.ValidationCompleted);
Expand All @@ -109,6 +111,14 @@ public async Task<InstallationValidationResult> StartInstallationValidation()
}
}

private ReportFormat reportFormatFromDTO()
{
var format = ReportFormat.None;
if (_reportOptionsDTO.ExportToPdf) format |= ReportFormat.Pdf;
if (_reportOptionsDTO.ExportToMarkdown) format |= ReportFormat.Markdown;
return format;
}

private void updateValidationRunningState(bool running)
{
_validationRunning = running;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class SimulationComparisonPresenter : AbstractDisposablePresenter<ISimula
private readonly IBatchComparisonTask _batchComparisonTask;
private readonly IValidationReportingTask _validationReportingTask;
private readonly FolderComparisonDTO _folderComparisonDTO;
private readonly ReportOptionsDTO _reportOptionsDTO = new ReportOptionsDTO();

public SimulationComparisonPresenter(ISimulationComparisonView view, IInstallationValidatorConfiguration configuration, IDialogCreator dialogCreator,
IBatchComparisonTask batchComparisonTask, IValidationReportingTask validationReportingTask) : base(view)
Expand All @@ -45,6 +46,7 @@ public SimulationComparisonPresenter(ISimulationComparisonView view, IInstallati
_validationReportingTask = validationReportingTask;
_folderComparisonDTO = new FolderComparisonDTO();
view.BindTo(_folderComparisonDTO);
view.BindToReportOptions(_reportOptionsDTO);
}

public void Handle(AppendTextToLogEvent eventToHandle)
Expand All @@ -70,7 +72,7 @@ public async Task StartComparison()
this.LogLine();

this.LogLine(Logs.StartingReport);
await _validationReportingTask.CreateReport(comparisonResult, _folderComparisonDTO.FirstFolder.FolderPath, _folderComparisonDTO.SecondFolder.FolderPath, openReport: true);
await _validationReportingTask.CreateReport(comparisonResult, _folderComparisonDTO.FirstFolder.FolderPath, _folderComparisonDTO.SecondFolder.FolderPath, new ReportOptions(reportFormatFromDTO(), openReport: true));
this.LogLine();

this.LogLine(Logs.ComparisonCompleted);
Expand Down Expand Up @@ -102,6 +104,14 @@ private ComparisonSettings comparisonSettingsFromDTO()
};
}

private ReportFormat reportFormatFromDTO()
{
var format = ReportFormat.None;
if (_reportOptionsDTO.ExportToPdf) format |= ReportFormat.Pdf;
if (_reportOptionsDTO.ExportToMarkdown) format |= ReportFormat.Markdown;
return format;
}

private void updateComparisonRunningState(bool running)
{
_comparisonRunning = running;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace InstallationValidator.Core.Presentation.Views
public interface IMainView : ILoggerView, IView<IMainPresenter>
{
void BindTo(FolderDTO outputFolderDTO);
void BindToReportOptions(ReportOptionsDTO reportOptionsDTO);
void ValidationIsRunning(bool validationRunning);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ public interface ISimulationComparisonView : ILoggerView, IView<ISimulationCompa
{
void ComparisonIsRunning(bool comparisonRunning);
void BindTo(FolderComparisonDTO folderComparisonDTO);
void BindToReportOptions(ReportOptionsDTO reportOptionsDTO);
}
}

This file was deleted.

Loading