Skip to content

Commit

Permalink
Merge pull request #40 from HicServices/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jas88 authored Aug 17, 2020
2 parents 8e8f5b3 + 7e2e1a0 commit 5ed87c9
Show file tree
Hide file tree
Showing 16 changed files with 340 additions and 53 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

-
## [2.3.1] - 2020-08-17

- Add support for DX (Digital Radiography) modality
- Obsolete method CorrectFoDicomVersion removed, previously deprecated

### Dependencies

- Bump fo-dicom from 4.0.5 to 4.0.6
- Bump HIC.FAnsiSql from 0.11.1 to 1.0.5
- Bump MongoDB.Driver from 2.10.4 to 2.11.0
- Bump NLog from 4.7.2 to 4.7.3

## [2.3.0] - 2020-05-21

Expand Down
6 changes: 6 additions & 0 deletions DicomTypeTranslation.Tests/BsonTranslationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ public void OneTimeSetUp()
TestLogger.Setup();
}

[OneTimeTearDown]
public void OneTimeTearDown()
{
TestLogger.ShutDown();
}

#endregion

#region Test Helpers
Expand Down
11 changes: 8 additions & 3 deletions DicomTypeTranslation.Tests/DicomTypeTranslation.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="fo-dicom.Json" Version="4.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<Content Include="..\Templates\DX.it" Link="Templates\DX.it">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="fo-dicom.Json" Version="4.0.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
Expand Down
6 changes: 6 additions & 0 deletions DicomTypeTranslation.Tests/DicomTypeTranslatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public void OneTimeSetUp()
TestLogger.Setup();
}

[OneTimeTearDown]
public void OneTimeTearDown()
{
TestLogger.ShutDown();
}

#endregion

#region Tests
Expand Down
7 changes: 0 additions & 7 deletions DicomTypeTranslation.Tests/ExampleUsages.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
using Dicom;
using DicomTypeTranslation.TableCreation;
using FAnsi.Discovery;
using FAnsi.Discovery.TypeTranslation;
using FAnsi.Implementation;
using FAnsi.Implementations.MicrosoftSQL;
using FAnsi.Implementations.MySql;
using FAnsi.Implementations.Oracle;
using MySql.Data.MySqlClient;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using TypeGuesser;

namespace DicomTypeTranslation.Tests
Expand Down
20 changes: 15 additions & 5 deletions DicomTypeTranslation.Tests/Helpers/TestLogger.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

using System;
using NLog;
using NLog.Config;
using NLog.Targets;
Expand All @@ -7,21 +8,30 @@ namespace DicomTypeTranslation.Tests.Helpers
{
public static class TestLogger
{
private static LoggingConfiguration _logConfig;
private static ConsoleTarget _consoleTarget;

public static void Setup()
{
var logConfig = new LoggingConfiguration();
_logConfig = new LoggingConfiguration();

var consoleTarget = new ConsoleTarget("TestConsole")
_consoleTarget = new ConsoleTarget("TestConsole")
{
Layout = "${level} | ${message} | ${exception:format=toString,Data:maxInnerExceptionLevel=5}"
};

logConfig.AddTarget(consoleTarget);
logConfig.AddRuleForAllLevels(consoleTarget);
_logConfig.AddTarget(_consoleTarget);
_logConfig.AddRuleForAllLevels(_consoleTarget);

LogManager.GlobalThreshold = LogLevel.Trace;
LogManager.Configuration = logConfig;
LogManager.Configuration = _logConfig;
LogManager.GetCurrentClassLogger().Info("TestLogger setup, previous configuration replaced");
}

public static void ShutDown()
{
LogManager.Configuration = _logConfig = null;
_consoleTarget.Dispose();
}
}
}
6 changes: 6 additions & 0 deletions DicomTypeTranslation.Tests/JsonDicomConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public void SetUp()
TestLogger.Setup();
}

[OneTimeTearDown]
public void OneTimeTearDown()
{
TestLogger.ShutDown();
}

#endregion

#region Test Helpers
Expand Down
3 changes: 3 additions & 0 deletions DicomTypeTranslation.Tests/TemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public void Template_ExampleYaml()
[TestCase("OTHER",FAnsi.DatabaseType.MicrosoftSQLServer)]
[TestCase("OTHER",FAnsi.DatabaseType.MySql)]
[TestCase("OTHER",FAnsi.DatabaseType.Oracle)]
[TestCase("DX",FAnsi.DatabaseType.MicrosoftSQLServer)]
[TestCase("DX",FAnsi.DatabaseType.MySql)]
[TestCase("DX",FAnsi.DatabaseType.Oracle)]
public void TestTemplate(string template, FAnsi.DatabaseType dbType)
{
string templateFile = Path.Combine(TestContext.CurrentContext.TestDirectory,"Templates",template + ".it");
Expand Down
1 change: 1 addition & 0 deletions DicomTypeTranslation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{6A04501E-26BE-41E1-9C3E-8A1C1DC90F6D}"
ProjectSection(SolutionItems) = preProject
Templates\CT.it = Templates\CT.it
Templates\DX.it = Templates\DX.it
Templates\MR.it = Templates\MR.it
Templates\NM.it = Templates\NM.it
Templates\OTHER.it = Templates\OTHER.it
Expand Down
10 changes: 5 additions & 5 deletions DicomTypeTranslation/DicomTypeTranslation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
<None Include="Elevation\TagElevation.cd" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="fo-dicom.NetCore" Version="4.0.5" />
<PackageReference Include="HIC.FAnsiSql" Version="0.11.1" />
<PackageReference Include="MongoDB.Driver" Version="2.10.4" />
<PackageReference Include="fo-dicom.NetCore" Version="4.0.6" />
<PackageReference Include="HIC.FAnsiSql" Version="1.0.5" />
<PackageReference Include="MongoDB.Driver" Version="2.11.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="4.7.2" />
<PackageReference Include="YamlDotNet" Version="8.1.1" />
<PackageReference Include="NLog" Version="4.7.3" />
<PackageReference Include="YamlDotNet" Version="8.1.2" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions DicomTypeTranslation/HIC.DicomTypeTranslation.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<copyright>Copyright 2019</copyright>
<tags>Dicom,ETL,SQL</tags>
<dependencies>
<dependency id="fo-dicom.NetCore" version="4.0.5" />
<dependency id="HIC.FAnsiSql" version="0.11.1" />
<dependency id="MongoDB.Driver" version="2.10.4" />
<dependency id="fo-dicom.NetCore" version="4.0.6" />
<dependency id="HIC.FAnsiSql" version="1.0.5" />
<dependency id="MongoDB.Driver" version="2.11.0" />
<dependency id="Newtonsoft.Json" version="12.0.3" />
<dependency id="NLog" version="4.7.2" />
<dependency id="YamlDotNet" version="8.1.1" />
<dependency id="NLog" version="4.7.3" />
<dependency id="YamlDotNet" version="8.1.2" />
</dependencies>
</metadata>
<files>
Expand Down
19 changes: 0 additions & 19 deletions DicomTypeTranslation/Helpers/DicomDatasetHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ namespace DicomTypeTranslation.Helpers
/// </summary>
public static class DicomDatasetHelpers
{
/// <summary>
/// Checks the correct fo-dicom library is present for the platform at runtime
/// </summary>
/// <returns></returns>
[Obsolete("This is likely no longer needed since we explicitly build (and fo-dicom provides) packages for both Windows & Linux")]
[UsedImplicitly]
public static bool CorrectFoDicomVersion()
{
try
{
Encoding _ = Dicom.IO.IOManager.BaseEncoding;
return true;
}
catch (NullReferenceException)
{
return false;
}
}

/// <summary>
/// Returns true if the elements in <paramref name="a"/> are the same set of tags and values as <paramref name="b"/>
/// </summary>
Expand Down
10 changes: 5 additions & 5 deletions PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

| Package | Source Code | Version | License | Purpose | Additional Risk Assessment |
| ------- | ------------| --------| ------- | ------- | -------------------------- |
| HIC.FAnsiSql |[GitHub](https://github.com/HicServices/FAnsiSql) | [0.11.1](https://www.nuget.org/packages/HIC.FansiSql/0.11.1) | [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Handles assigning translating database types and DBMS interactions|
|[MongoDB.Driver](https://docs.mongodb.com/ecosystem/drivers/csharp/)| [GitHub](https://github.com/mongodb/mongo-csharp-driver) |[2.10.4](https://www.nuget.org/packages/MongoDB.Driver/2.10.4)| [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) | Types for writting dicom tags into MongoDb databases|
| fo-dicom.NetCore | [GitHub](https://github.com/fo-dicom/fo-dicom) |[4.0.5](https://www.nuget.org/packages/fo-dicom.NetCore/4.0.5)|[MS-PL](https://opensource.org/licenses/MS-PL) | Handles reading/writing dicom tags from dicom datasets | |
| YamlDotNet | [GitHub](https://github.com/aaubry/YamlDotNet) | [8.1.1](https://www.nuget.org/packages/YamlDotNet/8.1.1) | [MIT](https://opensource.org/licenses/MIT) |Loading configuration files|
| [NLog](https://nlog-project.org/) | [GitHub](https://github.com/NLog/NLog) | [4.7.2](https://www.nuget.org/packages/NLog/4.7.2) | [BSD 3-Clause](https://github.com/NLog/NLog/blob/dev/LICENSE.txt) | Flexible user configurable logging | |
| HIC.FAnsiSql |[GitHub](https://github.com/HicServices/FAnsiSql) | [1.0.5](https://www.nuget.org/packages/HIC.FansiSql/1.0.5) | [GPL 3.0](https://www.gnu.org/licenses/gpl-3.0.html) | Handles assigning translating database types and DBMS interactions|
|[MongoDB.Driver](https://docs.mongodb.com/ecosystem/drivers/csharp/)| [GitHub](https://github.com/mongodb/mongo-csharp-driver) |[2.11.0](https://www.nuget.org/packages/MongoDB.Driver/2.11.0)| [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) | Types for writting dicom tags into MongoDb databases|
| fo-dicom.NetCore | [GitHub](https://github.com/fo-dicom/fo-dicom) |[4.0.6](https://www.nuget.org/packages/fo-dicom.NetCore/4.0.6)|[MS-PL](https://opensource.org/licenses/MS-PL) | Handles reading/writing dicom tags from dicom datasets | |
| YamlDotNet | [GitHub](https://github.com/aaubry/YamlDotNet) | [8.1.2](https://www.nuget.org/packages/YamlDotNet/8.1.2) | [MIT](https://opensource.org/licenses/MIT) |Loading configuration files|
| [NLog](https://nlog-project.org/) | [GitHub](https://github.com/NLog/NLog) | [4.7.3](https://www.nuget.org/packages/NLog/4.7.3) | [BSD 3-Clause](https://github.com/NLog/NLog/blob/dev/LICENSE.txt) | Flexible user configurable logging | |
| [Newtonsoft.Json](https://www.newtonsoft.com/json) | [GitHub](https://github.com/JamesNK/Newtonsoft.Json) | [12.0.3](https://www.nuget.org/packages/Newtonsoft.Json/12.0.3) | [MIT](https://opensource.org/licenses/MIT) | Serialization of objects for sharing/transmission |
| [Nunit](https://nunit.org/) |[GitHub](https://github.com/nunit/nunit) | [3.11.0](https://www.nuget.org/packages/NUnit/3.11.0) | [MIT](https://opensource.org/licenses/MIT) | Unit testing |
| NUnit3TestAdapter | [GitHub](https://github.com/nunit/nunit3-vs-adapter)| [3.13.0](https://www.nuget.org/packages/NUnit3TestAdapter/3.13.0) | [MIT](https://opensource.org/licenses/MIT) | Run unit tests from within Visual Studio |
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
[assembly: AssemblyCulture("")]

// These should be overwritten by release builds
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.3.0")]
[assembly: AssemblyInformationalVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.1")]
[assembly: AssemblyFileVersion("2.3.1")]
[assembly: AssemblyInformationalVersion("2.3.1")]
Loading

0 comments on commit 5ed87c9

Please sign in to comment.