From 694ff48d5714c436d9669920bf9794f8dd5c11f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 08:40:49 +0100 Subject: [PATCH 1/5] Bump coverallsapp/github-action from 2.2.3 to 2.3.0 (#1819) Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.2.3 to 2.3.0. - [Release notes](https://github.com/coverallsapp/github-action/releases) - [Commits](https://github.com/coverallsapp/github-action/compare/v2.2.3...v2.3.0) --- updated-dependencies: - dependency-name: coverallsapp/github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17ae601489..533ecd6b08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,7 +66,7 @@ jobs: mv `find coverage -type f` db-ui.lcov dotnet test Rdmp.Core.Tests/Rdmp.Core.Tests.csproj --nologo --collect:"XPlat Code Coverage" --no-build --verbosity minimal -c Release --results-directory coverage -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov mv `find coverage -type f` db-core.lcov - - uses: coverallsapp/github-action@v2.2.3 + - uses: coverallsapp/github-action@v2.3.0 with: github-token: ${{ secrets.github_token }} files: ./db-ui.lcov ./db-core.lcov @@ -128,7 +128,7 @@ jobs: mv `find coverage -type f` fs-ui.lcov dotnet test Rdmp.Core.Tests/Rdmp.Core.Tests.csproj --nologo --collect:"XPlat Code Coverage" --no-build --verbosity minimal -c Release --results-directory coverage -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov mv `find coverage -type f` fs-core.lcov - - uses: coverallsapp/github-action@v2.2.3 + - uses: coverallsapp/github-action@v2.3.0 with: github-token: ${{ secrets.github_token }} files: ./fs-ui.lcov ./fs-core.lcov From ee9883b1173af3e63796b1baa2040ce6eb40c210 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 10 May 2024 15:20:59 +0100 Subject: [PATCH 2/5] Task/RDMP-161 Add ability to mark as not extractable (#1796) * add ability to mark as not extractable * add code comments * update changelog --- CHANGELOG.md | 3 ++- .../ExecuteCommandChangeExtractionCategory.cs | 14 +++++++++++--- Rdmp.Core/Curation/Data/ExtractionCategory.cs | 7 ++++++- .../ExtractionInformationStateBasedIconProvider.cs | 3 +++ SharedAssemblyInfo.cs | 6 +++--- directory.build.props | 2 +- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 195c703871..12292b4132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,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). -## [8.1.6] = Unreleased +## [8.1.6] - Unreleased ## Changed - Add Microsoft.Bcl.AsyncInterfaces 6.0.0 for plugin dependancy tree - Add prompt to reanem container when adding a cohort filter +- Add ability to set Extraction Categort as "Not Extractable" ## [8.1.5] - 2024-04-03 diff --git a/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandChangeExtractionCategory.cs b/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandChangeExtractionCategory.cs index f8a80e4f55..0e71a835df 100644 --- a/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandChangeExtractionCategory.cs +++ b/Rdmp.Core/CommandExecution/AtomicCommands/ExecuteCommandChangeExtractionCategory.cs @@ -69,17 +69,25 @@ public override void Execute() Show("Cannot set the Extraction Category to 'Core' for a Project Specific Catalogue item. It will be saved as 'Project Specific'."); } - if (ExecuteWithCommit(() => ExecuteImpl(c.Value), $"Set ExtractionCategory to '{c}'", _extractionInformations)) + if (ExecuteWithCommit(() => ExecuteImpl(c.Value), c == ExtractionCategory.NotExtractable ? "Make Not Extractable" : $"Set ExtractionCategory to '{c}'", _extractionInformations)) //publish the root Catalogue Publish(_extractionInformations.First()); } private void ExecuteImpl(ExtractionCategory category) { + foreach (var ei in _extractionInformations) { - ei.ExtractionCategory = category; - ei.SaveToDatabase(); + if (category == ExtractionCategory.NotExtractable) + { + ei.DeleteInDatabase(); + } + else + { + ei.ExtractionCategory = category; + ei.SaveToDatabase(); + } } } } \ No newline at end of file diff --git a/Rdmp.Core/Curation/Data/ExtractionCategory.cs b/Rdmp.Core/Curation/Data/ExtractionCategory.cs index a05045513e..bd1f215d61 100644 --- a/Rdmp.Core/Curation/Data/ExtractionCategory.cs +++ b/Rdmp.Core/Curation/Data/ExtractionCategory.cs @@ -45,5 +45,10 @@ public enum ExtractionCategory /// /// Value can only be used for fetching ExtractionInformations. This means that all will be returned. You cannot set a column to have an ExtractionCategory of Any /// - Any + Any, + + /// + /// Value used for improved UI experience, will be set to null when executed + /// + NotExtractable } \ No newline at end of file diff --git a/Rdmp.Core/Icons/IconProvision/StateBasedIconProviders/ExtractionInformationStateBasedIconProvider.cs b/Rdmp.Core/Icons/IconProvision/StateBasedIconProviders/ExtractionInformationStateBasedIconProvider.cs index 24ca4a6d46..ebb4089aba 100644 --- a/Rdmp.Core/Icons/IconProvision/StateBasedIconProviders/ExtractionInformationStateBasedIconProvider.cs +++ b/Rdmp.Core/Icons/IconProvision/StateBasedIconProviders/ExtractionInformationStateBasedIconProvider.cs @@ -35,6 +35,8 @@ internal sealed class ExtractionInformationStateBasedIconProvider : IObjectState private static readonly Image NoIconAvailable = Image.Load(CatalogueIcons.NoIconAvailable); + private static readonly Image ExtractionInformationNotExtractable = IconOverlayProvider.GetOverlayNoCache(ExtractionInformationCore, OverlayKind.Delete); + public Image GetImageIfSupportedObject(object o) { if (o is ExtractionCategory cat) @@ -67,6 +69,7 @@ private static Image GetImage(ExtractionCategory category) ExtractionCategory.Deprecated => ExtractionInformationDeprecated, ExtractionCategory.ProjectSpecific => ExtractionInformationProjectSpecific, ExtractionCategory.Any => NoIconAvailable, + ExtractionCategory.NotExtractable => ExtractionInformationNotExtractable, _ => throw new ArgumentOutOfRangeException(nameof(category)) }; } diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index bd9a535fe3..486f593539 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -10,6 +10,6 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("8.1.5")] -[assembly: AssemblyFileVersion("8.1.5")] -[assembly: AssemblyInformationalVersion("8.1.5")] +[assembly: AssemblyVersion("8.1.6")] +[assembly: AssemblyFileVersion("8.1.6")] +[assembly: AssemblyInformationalVersion("8.1.6-rc1")] diff --git a/directory.build.props b/directory.build.props index 44541712ba..eff01de431 100644 --- a/directory.build.props +++ b/directory.build.props @@ -1,7 +1,7 @@ 11.0 - 8.1.5 + 8.1.6 true \ No newline at end of file From 6da4b56afdb4b966dcc4daaf15c0c7ab5e749740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 07:42:23 +0100 Subject: [PATCH 3/5] Bump YamlDotNet from 15.1.2 to 15.1.4 (#1822) Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 15.1.2 to 15.1.4. - [Release notes](https://github.com/aaubry/YamlDotNet/releases) - [Commits](https://github.com/aaubry/YamlDotNet/compare/v15.1.2...v15.1.4) --- updated-dependencies: - dependency-name: YamlDotNet dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index e009249f10..6677eb8014 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -20,7 +20,7 @@ - + From 8fdc24a89ba819b3058c765c2255aa6e78dd9f5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 07:42:49 +0100 Subject: [PATCH 4/5] Bump Autoupdater.NET.Official from 1.8.5 to 1.8.6 (#1821) Bumps [Autoupdater.NET.Official](https://github.com/ravibpatel/AutoUpdater.NET) from 1.8.5 to 1.8.6. - [Release notes](https://github.com/ravibpatel/AutoUpdater.NET/releases) - [Commits](https://github.com/ravibpatel/AutoUpdater.NET/compare/v1.8.5...v1.8.6) --- updated-dependencies: - dependency-name: Autoupdater.NET.Official dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: James Friel --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 6677eb8014..76f2ba2dcf 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -22,7 +22,7 @@ - + From 7b08b4c8df6a73161b5169c30a4f214efbfc5bfe Mon Sep 17 00:00:00 2001 From: James Friel Date: Tue, 14 May 2024 08:36:27 +0100 Subject: [PATCH 5/5] Bugfix/rdmp 162 Fix Error Msg Being Swallowed (#1798) * update dll imports * tidy up code * update ddl import to libraryimport * use getScrolPos * Update directory.build.props --- CHANGELOG.md | 1 + Rdmp.Core/DataExport/Checks/SelectedDataSetsChecker.cs | 2 +- Rdmp.UI.Tests/UITimeoutAttribute.cs | 4 ++-- Rdmp.UI/RichTextBoxEx.cs | 4 ++-- .../SimpleDialogs/ConfigurePrimaryKeyCollisionResolverUI.cs | 2 +- Rdmp.UI/TransparentHelpSystem/TransparentHelpForm.cs | 2 +- directory.build.props | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12292b4132..25418e5d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Changed +- Improve error messages for Multi-ExtractionIdentifier extractions - Add Microsoft.Bcl.AsyncInterfaces 6.0.0 for plugin dependancy tree - Add prompt to reanem container when adding a cohort filter - Add ability to set Extraction Categort as "Not Extractable" diff --git a/Rdmp.Core/DataExport/Checks/SelectedDataSetsChecker.cs b/Rdmp.Core/DataExport/Checks/SelectedDataSetsChecker.cs index fa3baf87bf..b26bc58b24 100644 --- a/Rdmp.Core/DataExport/Checks/SelectedDataSetsChecker.cs +++ b/Rdmp.Core/DataExport/Checks/SelectedDataSetsChecker.cs @@ -137,7 +137,7 @@ public void Check(ICheckNotifier notifier) { notifier.OnCheckPerformed( new CheckEventArgs( - $"Could not generate valid extraction SQL for dataset {ds} in configuration {config}", + $"Could not generate valid extraction SQL for dataset {ds} in configuration {config}. {e.Message}", CheckResult.Fail, e)); return; } diff --git a/Rdmp.UI.Tests/UITimeoutAttribute.cs b/Rdmp.UI.Tests/UITimeoutAttribute.cs index c5cbc7169f..a6e6b7505c 100644 --- a/Rdmp.UI.Tests/UITimeoutAttribute.cs +++ b/Rdmp.UI.Tests/UITimeoutAttribute.cs @@ -42,13 +42,13 @@ public TimeoutCommand(TestCommand innerCommand, int timeout) : base(innerCommand _timeout = timeout; } - [LibraryImport("user32.dll")] + [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "SendMessageW", StringMarshalling = StringMarshalling.Utf16)] private static partial IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, IntPtr lParam); [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount); - [LibraryImport("user32.dll")] + [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "GetDlgItemW", StringMarshalling = StringMarshalling.Utf16)] private static partial IntPtr GetDlgItem(IntPtr hDlg, int nIDDlgItem); private string YesNoDialog = "#32770"; diff --git a/Rdmp.UI/RichTextBoxEx.cs b/Rdmp.UI/RichTextBoxEx.cs index 9e85425284..f7fb25913b 100644 --- a/Rdmp.UI/RichTextBoxEx.cs +++ b/Rdmp.UI/RichTextBoxEx.cs @@ -47,13 +47,13 @@ private struct CHARFORMAT2_STRUCT public byte bReserved1; } - [LibraryImport("user32.dll")] + [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "SendMessageW", StringMarshalling = StringMarshalling.Utf16)] private static partial IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); private const int WM_USER = 0x0400; private const int EM_GETCHARFORMAT = WM_USER + 58; private const int EM_SETCHARFORMAT = WM_USER + 68; - + private const int SCF_SELECTION = 0x0001; private const int SCF_WORD = 0x0002; private const int SCF_ALL = 0x0004; diff --git a/Rdmp.UI/SimpleDialogs/ConfigurePrimaryKeyCollisionResolverUI.cs b/Rdmp.UI/SimpleDialogs/ConfigurePrimaryKeyCollisionResolverUI.cs index 8fb84dcbb7..6802272fc3 100644 --- a/Rdmp.UI/SimpleDialogs/ConfigurePrimaryKeyCollisionResolverUI.cs +++ b/Rdmp.UI/SimpleDialogs/ConfigurePrimaryKeyCollisionResolverUI.cs @@ -362,6 +362,6 @@ private bool AllAreSameDirection() .Count() == 1; //if count of distinct directions is 1 then they are all in the same direction } - [LibraryImport("user32.dll")] + [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "GetScrollPosW", StringMarshalling = StringMarshalling.Utf16)] private static partial int GetScrollPos(IntPtr hWnd, Orientation nBar); } \ No newline at end of file diff --git a/Rdmp.UI/TransparentHelpSystem/TransparentHelpForm.cs b/Rdmp.UI/TransparentHelpSystem/TransparentHelpForm.cs index 8f9c97c536..0a245b0c50 100644 --- a/Rdmp.UI/TransparentHelpSystem/TransparentHelpForm.cs +++ b/Rdmp.UI/TransparentHelpSystem/TransparentHelpForm.cs @@ -22,7 +22,7 @@ public partial class TransparentHelpForm : Form private readonly Control _host; private Control _highlight; - [LibraryImport("user32.dll", SetLastError = true)] + [LibraryImport("user32.dll", SetLastError = true, EntryPoint = "ShowWindowW", StringMarshalling = StringMarshalling.Utf16)] [return: MarshalAs(UnmanagedType.Bool)] private static partial bool ShowWindow(IntPtr hWnd, int nCmdShow); diff --git a/directory.build.props b/directory.build.props index eff01de431..9c655b1096 100644 --- a/directory.build.props +++ b/directory.build.props @@ -4,4 +4,4 @@ 8.1.6 true - \ No newline at end of file +