From 716ad1fd1b789a6f0a0b861a89992d154399a981 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 22 Mar 2024 13:15:02 +0000 Subject: [PATCH 1/7] update build --- .github/workflows/dotnet-core.yml | 6 +++--- README.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index e4b488d..e24e302 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -70,8 +70,8 @@ jobs: dotnet publish Plugin/windows/windows.csproj -c Release -o p/windows dotnet publish Plugin/main/main.csproj -c Release -o p/main - cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg plugin.nuspec p - dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg --dir yaml + cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp plugin.nuspec p + dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp --dir yaml dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml - name: Store created nupkg files uses: actions/upload-artifact@v4 @@ -84,4 +84,4 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }} - file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg' + file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp' diff --git a/README.md b/README.md index 22e654d..190e2cd 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,15 @@ You can build this plugin ready for upload to an RDMP instance using: ```bash dotnet publish -p:DebugType=embedded -p:GenerateDocumentation=false Plugin/windows/windows.csproj -c Release -o p/windows dotnet publish -p:DebugType=embedded -p:GenerateDocumentation=false Plugin/main/main.csproj -c Release -o p/main -7z a -tzip Rdmp.Hic.Plugin.6.1.0.nupkg hicplugin.nuspec p -dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file Rdmp.Hic.Plugin.6.1.0.nupkg --dir yaml +7z a -tzip Rdmp.Hic.Plugin.6.1.0.rdmp hicplugin.nuspec p +dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file Rdmp.Hic.Plugin.6.1.0.rdmp --dir yaml ``` -Once built you will have a file called `Rdmp.Hic.Plugin.6.1.0.nupkg` +Once built you will have a file called `Rdmp.Hic.Plugin.6.1.0.rdmp` Upload it to RDMP using ```bash -./rdmp pack -p -f Z:\Repos\HICPlugin\Rdmp.Hic.Plugin.6.1.0.nupkg +./rdmp pack -p -f Z:\Repos\HICPlugin\Rdmp.Hic.Plugin.6.1.0.rdmp ``` _Upload into RDMP. Or use the gui client 'Plugins' node under the Tables(Advanced) toolbar button_ From 319df3b1bdb8235436dc470cc881c9fef302a0c6 Mon Sep 17 00:00:00 2001 From: James Friel Date: Fri, 22 Mar 2024 13:22:02 +0000 Subject: [PATCH 2/7] fix build --- .github/workflows/dotnet-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index e24e302..9ed33f6 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -76,7 +76,7 @@ jobs: - name: Store created nupkg files uses: actions/upload-artifact@v4 with: - path: ./*.nupkg + path: ./*.rdmp retention-days: 1 - name: Upload release binaries if: contains(github.ref,'refs/tags/') From a7eaedc636963b0a38180f4496ff55e2d23796e9 Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 8 Apr 2024 11:26:47 +0100 Subject: [PATCH 3/7] output buth --- .github/workflows/dotnet-core.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 9ed33f6..640155a 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -72,11 +72,15 @@ jobs: dotnet publish Plugin/main/main.csproj -c Release -o p/main cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp plugin.nuspec p dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp --dir yaml + cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg plugin.nuspec p + dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg --dir yaml dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml - name: Store created nupkg files uses: actions/upload-artifact@v4 with: - path: ./*.rdmp + path: | + ./*.rdmp + ./*.nupkg retention-days: 1 - name: Upload release binaries if: contains(github.ref,'refs/tags/') From e8b1ea7bbf37577551d7b5f2ea56158741ad1ada Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 8 Apr 2024 11:41:39 +0100 Subject: [PATCH 4/7] fix build --- .github/workflows/dotnet-core.yml | 6 +----- DrsPlugin/Extraction/ImageExtraction.cs | 3 ++- .../ExecuteCommandSetupGoFusionFromDatabase.cs | 2 +- RDMP/Directory.Packages.props | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 640155a..9ed33f6 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -72,15 +72,11 @@ jobs: dotnet publish Plugin/main/main.csproj -c Release -o p/main cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp plugin.nuspec p dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp --dir yaml - cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg plugin.nuspec p - dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg --dir yaml dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml - name: Store created nupkg files uses: actions/upload-artifact@v4 with: - path: | - ./*.rdmp - ./*.nupkg + path: ./*.rdmp retention-days: 1 - name: Upload release binaries if: contains(github.ref,'refs/tags/') diff --git a/DrsPlugin/Extraction/ImageExtraction.cs b/DrsPlugin/Extraction/ImageExtraction.cs index 13ddb8e..c223665 100644 --- a/DrsPlugin/Extraction/ImageExtraction.cs +++ b/DrsPlugin/Extraction/ImageExtraction.cs @@ -1,4 +1,5 @@ using Rdmp.Core.Curation.Data; +using Rdmp.Core.Curation.Data.DataLoad; using Rdmp.Core.DataExport.DataExtraction.Commands; using Rdmp.Core.DataFlowPipeline; using Rdmp.Core.DataFlowPipeline.Requirements; @@ -61,7 +62,7 @@ public void PreInitialize(IExtractCommand request, IDataLoadEventListener listen if (Request.ColumnsToExtract is null) throw new InvalidOperationException("The request must contain a list of ColumnsToExtract (even if empty)"); - if (Request.Catalogue.LoadMetadata is null) + if (Request.Catalogue.CatalogueRepository.GetAllObjectsWhere("CatalogueID",Request.Catalogue.ID).Length == 0) listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, "The request has no associated metadata file. You may need to add a Data Load Configuration if you intend to extract the image files.")); //May be able to get rid of this warning entirely } diff --git a/GoDartsPluginUI/CommandExecution/AtomicCommands/ExecuteCommandSetupGoFusionFromDatabase.cs b/GoDartsPluginUI/CommandExecution/AtomicCommands/ExecuteCommandSetupGoFusionFromDatabase.cs index a4ffc73..99fec24 100644 --- a/GoDartsPluginUI/CommandExecution/AtomicCommands/ExecuteCommandSetupGoFusionFromDatabase.cs +++ b/GoDartsPluginUI/CommandExecution/AtomicCommands/ExecuteCommandSetupGoFusionFromDatabase.cs @@ -171,7 +171,7 @@ private LoadMetadata CreateLoadMetadata(List importedCatalogues) foreach (var catalogue in importedCatalogues) { - ((Catalogue)catalogue).LoadMetadata_ID = lmd.ID; + lmd.LinkToCatalogue(catalogue); catalogue.LoggingDataTask = lmd.Name; catalogue.SaveToDatabase(); } diff --git a/RDMP/Directory.Packages.props b/RDMP/Directory.Packages.props index 9044a6d..4a76892 100644 --- a/RDMP/Directory.Packages.props +++ b/RDMP/Directory.Packages.props @@ -11,7 +11,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - From 1c23fd59f9a308bbb1d0fe450f167a442fba0b3e Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 8 Apr 2024 11:45:23 +0100 Subject: [PATCH 5/7] update release binary --- .github/workflows/dotnet-core.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 9ed33f6..d04a5d3 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -72,11 +72,15 @@ jobs: dotnet publish Plugin/main/main.csproj -c Release -o p/main cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp plugin.nuspec p dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp --dir yaml + cmd /c 7z a -tzip HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg plugin.nuspec p + dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- pack -p --file HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg --dir yaml dotnet run --project RDMP/Tools/rdmp/rdmp.csproj -c Release -- cmd listsupportedcommands --dir yaml - name: Store created nupkg files uses: actions/upload-artifact@v4 with: - path: ./*.rdmp + path: | + ./*.rdmp + ./*.nupkg retention-days: 1 - name: Upload release binaries if: contains(github.ref,'refs/tags/') @@ -84,4 +88,5 @@ jobs: with: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }} - file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.rdmp' + file_glob: true + file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.*' From a8687cae0224fcc2e908fdf52eeec68d471fc7ef Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 8 Apr 2024 11:57:24 +0100 Subject: [PATCH 6/7] update test --- DrsPlugin/Extraction/ImageExtraction.cs | 5 +++-- SharedAssemblyInfo.cs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DrsPlugin/Extraction/ImageExtraction.cs b/DrsPlugin/Extraction/ImageExtraction.cs index c223665..e1ae824 100644 --- a/DrsPlugin/Extraction/ImageExtraction.cs +++ b/DrsPlugin/Extraction/ImageExtraction.cs @@ -3,10 +3,12 @@ using Rdmp.Core.DataExport.DataExtraction.Commands; using Rdmp.Core.DataFlowPipeline; using Rdmp.Core.DataFlowPipeline.Requirements; +using Rdmp.Core.Repositories; using Rdmp.Core.ReusableLibraryCode.Checks; using Rdmp.Core.ReusableLibraryCode.Progress; using System; using System.Data; +using System.Linq; using System.Text.RegularExpressions; namespace DrsPlugin.Extraction; @@ -61,8 +63,7 @@ public void PreInitialize(IExtractCommand request, IDataLoadEventListener listen if (Request.ColumnsToExtract is null) throw new InvalidOperationException("The request must contain a list of ColumnsToExtract (even if empty)"); - - if (Request.Catalogue.CatalogueRepository.GetAllObjectsWhere("CatalogueID",Request.Catalogue.ID).Length == 0) + if (Request.Catalogue.CatalogueRepository is not null && !Request.Catalogue.CatalogueRepository.GetAllObjects().Where(l =>l.CatalogueID == Request.Catalogue.ID).Any()) listener.OnNotify(this, new NotifyEventArgs(ProgressEventType.Warning, "The request has no associated metadata file. You may need to add a Data Load Configuration if you intend to extract the image files.")); //May be able to get rid of this warning entirely } diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index 9b34c37..ff05687 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -10,6 +10,6 @@ [assembly: AssemblyCulture("")] // These should be overwritten by release builds -[assembly: AssemblyVersion("6.1.3")] -[assembly: AssemblyFileVersion("6.1.3")] -[assembly: AssemblyInformationalVersion("6.1.3")] +[assembly: AssemblyVersion("6.1.4")] +[assembly: AssemblyFileVersion("6.1.4")] +[assembly: AssemblyInformationalVersion("6.1.4")] From b1a7d4d0d9ea132730e54bb9d8466e048f13e022 Mon Sep 17 00:00:00 2001 From: James Friel Date: Mon, 8 Apr 2024 12:43:13 +0100 Subject: [PATCH 7/7] tidy up --- DrsPlugin/Extraction/ImageExtraction.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/DrsPlugin/Extraction/ImageExtraction.cs b/DrsPlugin/Extraction/ImageExtraction.cs index e1ae824..e41e229 100644 --- a/DrsPlugin/Extraction/ImageExtraction.cs +++ b/DrsPlugin/Extraction/ImageExtraction.cs @@ -3,7 +3,6 @@ using Rdmp.Core.DataExport.DataExtraction.Commands; using Rdmp.Core.DataFlowPipeline; using Rdmp.Core.DataFlowPipeline.Requirements; -using Rdmp.Core.Repositories; using Rdmp.Core.ReusableLibraryCode.Checks; using Rdmp.Core.ReusableLibraryCode.Progress; using System;