Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/RDMP-153 Migrate to .rdmp plugin extention #67

Merged
merged 8 commits into from
Apr 8, 2024
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
9 changes: 7 additions & 2 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,23 @@ 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 }}.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: ./*.nupkg
path: |
./*.rdmp
./*.nupkg
retention-days: 1
- name: Upload release binaries
if: contains(github.ref,'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.nupkg'
file_glob: true
file: 'HIC.Rdmp.HicPlugin.Plugin.${{ steps.version.outputs.version }}.*'
5 changes: 3 additions & 2 deletions DrsPlugin/Extraction/ImageExtraction.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
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;
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;
Expand Down Expand Up @@ -60,8 +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 is not null && !Request.Catalogue.CatalogueRepository.GetAllObjects<ILoadMetadataCatalogueLinkage>().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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private LoadMetadata CreateLoadMetadata(List<ICatalogue> importedCatalogues)

foreach (var catalogue in importedCatalogues)
{
((Catalogue)catalogue).LoadMetadata_ID = lmd.ID;
lmd.LinkToCatalogue(catalogue);
catalogue.LoggingDataTask = lmd.Name;
catalogue.SaveToDatabase();
}
Expand Down
1 change: 0 additions & 1 deletion RDMP/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.XmlSerializer.Generator" Version="8.0.0"/>
<PackageVersion Include="MongoDB.Driver" Version="2.24.0"/>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3"/>
<PackageVersion Include="NPOI" Version="2.7.0"/>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Loading