Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/HicServices/RDMP
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Dec 18, 2024
2 parents 1542808 + b58152c commit 43bc53f
Show file tree
Hide file tree
Showing 94 changed files with 347 additions and 43 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ updates:
aws-sdk:
patterns:
- "AWSSDK.*"
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
interval: weekly
24 changes: 16 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: setup .NET
uses: actions/[email protected]
- name: Populate Databases.yaml
shell: bash
run: |
Expand Down Expand Up @@ -83,6 +85,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: setup .NET
uses: actions/[email protected]
- name: Populate Databases.yaml
shell: bash
run: |
Expand Down Expand Up @@ -149,6 +153,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: setup .NET
uses: actions/[email protected]
- name: Determine RDMP build version
id: version
shell: bash
Expand All @@ -173,14 +179,14 @@ jobs:
- name: Temporary Bundle of ddls for auto-updater
shell: bash
run: |
cp -r Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/runtimes ./PublishWinForms
cp -r Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/x64 ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/D3DCompiler_47_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/PenImc_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/PresentationNative_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/vcruntime140_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/WebView2Loader.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net8.0-windows/win-x64/wpfgfx_cor3.dll ./PublishWinForms
cp -r Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/runtimes ./PublishWinForms
cp -r Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/x64 ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/D3DCompiler_47_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/PenImc_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/PresentationNative_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/vcruntime140_cor3.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/WebView2Loader.dll ./PublishWinForms
cp Application/ResearchDataManagementPlatform/bin/Release/net9.0-windows/win-x64/wpfgfx_cor3.dll ./PublishWinForms
- name: Install Plugins
shell: bash
run: |
Expand Down Expand Up @@ -286,6 +292,8 @@ jobs:
with:
path: ${{ github.workspace }}/
key: ${{ github.sha }}-your-cache-key-bundled
- name: setup .NET
uses: actions/[email protected]
- name: Determine RDMP build version
id: version
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup .NET
uses: actions/[email protected]

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
4 changes: 3 additions & 1 deletion Application/ResearchDataManagementPlatform/RDMPMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -81,7 +82,7 @@ public RDMPMainForm()
WindowState = FormWindowState.Maximized;
CloseOnEscape = false;

if (UserSettings.LicenseAccepted != new License("LIBRARYLICENSES").GetHashOfLicense())
if (UserSettings.LicenseAccepted != new WindowManagement.Licenses.License("LIBRARYLICENSES").GetHashOfLicense())
new LicenseUI().ShowDialog();
}

Expand Down Expand Up @@ -163,6 +164,7 @@ private void RDMPMainForm_Load(object sender, EventArgs e)
Loading = false;
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override string Text
{
get => base.Text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<ProjectGuid>{550988FD-F1FA-41D8-BE0F-00B4DE47D320}</ProjectGuid>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>$(TargetFramework)-windows</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
Expand Down
7 changes: 7 additions & 0 deletions Application/ResearchDataManagementPlatform/Theme/Themes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel;
using System.Globalization;
using System.Windows.Forms;
using Rdmp.UI.Theme;
Expand All @@ -16,6 +17,8 @@ namespace ResearchDataManagementPlatform.Theme;
public class MyVS2015BlueTheme : VS2015BlueTheme, ITheme
{
private ThemeExtender _extender;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool ApplyThemeToMenus { get; set; }

public MyVS2015BlueTheme()
Expand All @@ -40,6 +43,8 @@ public MyVS2015BlueTheme()
public class MyVS2015DarkTheme : VS2015DarkTheme, ITheme
{
private ThemeExtender _extender;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool ApplyThemeToMenus { get; set; }

public MyVS2015DarkTheme()
Expand All @@ -64,6 +69,8 @@ public MyVS2015DarkTheme()
public class MyVS2015LightTheme : VS2015LightTheme, ITheme
{
private ThemeExtender _extender;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool ApplyThemeToMenus { get; set; }

public MyVS2015LightTheme()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System.ComponentModel;
using System.Windows.Forms;
using Rdmp.Core.CommandExecution;
using Rdmp.Core.Curation.Data;
Expand All @@ -28,6 +29,7 @@ namespace ResearchDataManagementPlatform.WindowManagement.ContentWindowTracking.
[TechnicalUI]
public class PersistableSingleDatabaseObjectDockContent : RDMPSingleControlTab
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IMapsDirectlyToDatabaseTable DatabaseObject { get; private set; }

public const string Prefix = "RDMPSingleDatabaseObjectControl";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
using Rdmp.Core.Curation.Data.Dashboarding;
Expand All @@ -26,6 +27,7 @@ public class RDMPSingleControlTab : DockContent, IRefreshBusSubscriber
/// <summary>
/// The control hosted on this tab
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Control Control { get; protected set; }

public const string BasicPrefix = "BASIC";
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Build on and target .Net 9 rather than 8
## [8.4.2] - 2024-12-18

- Fix issue with MEF constructing Remote Table Attachers

## [8.4.1] - 2024-12-10

- Improve Overview Model Generation Speed
Expand Down
9 changes: 5 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<LangVersion>11.0</LangVersion>
<Version>8.4.0</Version>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<NoWarn>NU1902;NU1903;NU1904;1701;1702;CS1591;NU1701;CA1416</NoWarn>
</PropertyGroup>
</Project>
12 changes: 6 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project>
<ItemGroup>
<PackageVersion Include="AWSSDK.S3" Version="3.7.408.1" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.401.7" />
<PackageVersion Include="AWSSDK.SSO" Version="3.7.400.58" />
<PackageVersion Include="AWSSDK.SSOOIDC" Version="3.7.400.58" />
<PackageVersion Include="AWSSDK.S3" Version="3.7.410.6" />
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.401.13" />
<PackageVersion Include="AWSSDK.SSO" Version="3.7.400.64" />
<PackageVersion Include="AWSSDK.SSOOIDC" Version="3.7.400.64" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Equ" Version="2.3.0" />
<PackageVersion Include="ExcelNumberFormat" Version="1.1.0" />
Expand All @@ -17,7 +17,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Minio" Version="6.0.3" />
<PackageVersion Include="MongoDB.Driver" Version="3.0.0" />
<PackageVersion Include="MongoDB.Driver" Version="3.1.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NPOI" Version="2.7.2" />
<PackageVersion Include="NLog" Version="5.3.4" />
Expand All @@ -33,7 +33,7 @@
<PackageVersion Include="DockPanelSuite.ThemeVS2015" Version="3.1.1" />
<PackageVersion Include="System.Threading.ThreadPool" Version="4.3.0" />
<PackageVersion Include="WeCantSpell.Hunspell" Version="5.2.1" />
<PackageVersion Include="NUnit" Version="4.2.2" />
<PackageVersion Include="NUnit" Version="4.3.0" />
<PackageVersion Include="ObjectListView.Repack.NET6Plus" Version="2.9.5" />
<PackageVersion Include="Scintilla.NET" Version="5.3.2.9" />
<PackageVersion Include="System.Resources.Extensions" Version="9.0.0" />
Expand Down
32 changes: 32 additions & 0 deletions Rdmp.Core.Tests/DataLoad/Modules/Attachers/AttacherMEFTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using NPOI.SS.Formula.Functions;
using NUnit.Framework;
using Rdmp.Core.DataLoad.Engine.Attachers;
using Rdmp.Core.DataLoad.Modules.Attachers;
using Rdmp.Core.Repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tests.Common;

namespace Rdmp.Core.Tests.DataLoad.Modules.Attachers
{
public class AttacherMEFTest: UnitTests
{

[Test]
public void AttacherMEFCreationTest()
{
var types = MEF.GetTypes<IAttacher>().Where(t => !typeof(RemoteAttacher).IsAssignableTo(t)).ToArray();
List<string> AttacherPaths = types.Select(t => t.FullName).ToList();
foreach (var path in AttacherPaths)
{
Assert.DoesNotThrow(() =>
{
MEF.CreateA<IAttacher>(path);
});
}
}
}
}
1 change: 0 additions & 1 deletion Rdmp.Core.Tests/Rdmp.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<Product>Rdmp.Core.Tests</Product>
<Copyright>Copyright © 2019</Copyright>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<TargetFramework>net8.0</TargetFramework>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
Expand Down
5 changes: 5 additions & 0 deletions Rdmp.Core/DataLoad/Engine/Attachers/Attacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ protected Attacher(bool requestsExternalDatabaseCreation)
RequestsExternalDatabaseCreation = requestsExternalDatabaseCreation;
}

protected Attacher()
{
RequestsExternalDatabaseCreation = true;
}

public abstract void Check(ICheckNotifier notifier);


Expand Down
3 changes: 2 additions & 1 deletion Rdmp.Core/DataLoad/Modules/Attachers/RemoteAttacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ namespace Rdmp.Core.DataLoad.Modules.Attachers;
public class RemoteAttacher : Attacher, IPluginAttacher
{

public RemoteAttacher(bool requestsExternalDatabaseCreation=true) : base(requestsExternalDatabaseCreation) { }
public RemoteAttacher(bool requestsExternalDatabaseCreation = true) : base(requestsExternalDatabaseCreation) { }
public RemoteAttacher() : base(true) { }
[DemandsInitialization("How far back to pull data from")]
public AttacherHistoricalDurations HistoricalFetchDuration { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions Rdmp.Core/DataLoad/Modules/Attachers/RemoteTableAttacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public class RemoteTableAttacher : RemoteAttacher
public RemoteTableAttacher(bool requestsExternalDatabaseCreation=true) : base(requestsExternalDatabaseCreation)
{
}
public RemoteTableAttacher() : base(true)
{
}

[DemandsInitialization(
"The server to connect to (this replaces all other settings e.g. RemoteServer, RemoteDatabaseName etc")]
Expand Down
1 change: 0 additions & 1 deletion Rdmp.Core/Rdmp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<description>Core package for plugin development</description>
<copyright>Copyright 2018-2019</copyright>
<TargetFramework>net8.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
Expand Down
5 changes: 2 additions & 3 deletions Rdmp.UI.Tests/Rdmp.UI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<TargetFramework>$(TargetFramework)-windows</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<NoWarn>NU1701</NoWarn>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
<NoWarn>$(NoWarn);NU1701;SYSLIB0011</NoWarn>
<GenerateResourceWarnOnBinaryFormatterUse>false</GenerateResourceWarnOnBinaryFormatterUse>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions Rdmp.UI/AggregationUIs/AggregateGraphUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ public partial class AggregateGraphUI : AggregateGraph_Design
/// the sensible decision is taken e.g. to not try to render.
///
/// </summary>
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Silent { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Scintilla QueryEditor { get; private set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int Timeout
{
get => _timeoutControls.Timeout;
Expand Down Expand Up @@ -166,8 +169,13 @@ public void AbortLoadGraph()
llCancel.Visible = false;
}

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public Exception Exception { get; private set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Crashed { get; private set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool Done { get; private set; }

private Task _loadTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

Expand All @@ -30,12 +31,22 @@ public ConsequenceBar()
public static Color HasValuesColor = Color.Black;
public static Color IsNullColor = Color.LightGray;

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public double Correct { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public double Invalid { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public double Missing { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public double Wrong { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public double DBNull { get; set; }

[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Label { get; set; }

protected override void OnPaintBackground(PaintEventArgs e)
Expand Down
Loading

0 comments on commit 43bc53f

Please sign in to comment.