From 4d5820d3d7c0b3d48e197bf2c4d198543e902334 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 19 Aug 2024 16:52:23 -0700 Subject: [PATCH] v2.57.0 --- Adaptation/.vscode/tasks.json | 10 +++ Adaptation/FileHandlers/R32/FileRead.cs | 15 ++-- Adaptation/FileHandlers/R62/FileRead.cs | 15 ++-- .../Production/v2.56.0/DEP08CEPIEPSILON.cs | 8 +- .../Production/v2.57.0/DEP08CEPIEPSILON.cs | 74 +++++++++++++++++++ .../Production/v2.56.0/DEP08CEPIEPSILON.cs | 10 +-- .../Production/v2.57.0/DEP08CEPIEPSILON.cs | 72 ++++++++++++++++++ Adaptation/_Tests/Static/DEP08CEPIEPSILON.cs | 2 +- DEP08CEPIEPSILON.csproj | 3 +- Properties/AssemblyInfo.cs | 4 +- 10 files changed, 177 insertions(+), 36 deletions(-) create mode 100644 Adaptation/_Tests/CreateSelfDescription/Production/v2.57.0/DEP08CEPIEPSILON.cs create mode 100644 Adaptation/_Tests/Extract/Production/v2.57.0/DEP08CEPIEPSILON.cs diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json index 2d92dcc..51aea34 100644 --- a/Adaptation/.vscode/tasks.json +++ b/Adaptation/.vscode/tasks.json @@ -49,6 +49,16 @@ ], "problemMatcher": "$msCompile" }, + { + "label": "Format-Whitespaces", + "command": "dotnet", + "type": "process", + "args": [ + "format", + "whitespace" + ], + "problemMatcher": "$msCompile" + }, { "label": "Nuget Clear", "command": "dotnet", diff --git a/Adaptation/FileHandlers/R32/FileRead.cs b/Adaptation/FileHandlers/R32/FileRead.cs index a58ec51..648e516 100644 --- a/Adaptation/FileHandlers/R32/FileRead.cs +++ b/Adaptation/FileHandlers/R32/FileRead.cs @@ -35,7 +35,6 @@ public class FileRead : Shared.FileRead, IFileRead string[] segments; Dictionary systemStateToNames = new(); _KeyColumn = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.KeyColumn"); - _KeyColumn = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.SystemState"); _TimestampFormat = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.TimestampFormat"); ModelObjectParameterDefinition[] systemStates = GetProperties(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.SystemState"); foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in systemStates) @@ -139,7 +138,7 @@ public class FileRead : Shared.FileRead, IFileRead private ReadOnlyCollection GetSystemStateValues(List lines, string[] columns, int keyColumnIndex) { - List results = []; + List results = new(); string[] values; string? systemState; string keyColumnValue; @@ -170,9 +169,9 @@ public class FileRead : Shared.FileRead, IFileRead string systemState; int? keyColumnIndex; string checkFileName; - List headerLines = []; + List headerLines = new(); ReadOnlyCollection systemStateValues; - string missingKeyDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, "Missing-Key"); + string missingKeyDirectory = Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, "Missing-Key"); if (!Directory.Exists(missingKeyDirectory)) _ = Directory.CreateDirectory(missingKeyDirectory); string fileName = Path.GetFileName(reportFullPath); @@ -202,18 +201,18 @@ public class FileRead : Shared.FileRead, IFileRead keyColumnIndex = GetKeyColumnIndex(columns, _KeyColumn); if (keyColumnIndex is null) { - File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.SourceFileLocation, missingKeyDirectory, fileName)); + File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, missingKeyDirectory, fileName)); continue; } systemStateValues = GetSystemStateValues(lines, columns, keyColumnIndex.Value); if (systemStateValues.Count == 0) { - File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.SourceFileLocation, missingKeyDirectory, fileName)); + File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, missingKeyDirectory, fileName)); continue; } lines.AddRange(headerLines); - systemState = string.Join('-', systemStateValues); - checkFileName = Path.Combine(Path.GetDirectoryName(reportFullPath) ?? throw new Exception(), $"{equipment}-{timestamp}-{systemState}.pdsf"); + systemState = string.Join("-", systemStateValues); + checkFileName = Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, $"{equipment}-{timestamp}-{systemState}.pdsf"); File.WriteAllLines(checkFileName, lines); // File.Delete(reportFullPath); if (DateTime.TryParseExact(timestamp, _TimestampFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime)) diff --git a/Adaptation/FileHandlers/R62/FileRead.cs b/Adaptation/FileHandlers/R62/FileRead.cs index 78dcc29..34a1be6 100644 --- a/Adaptation/FileHandlers/R62/FileRead.cs +++ b/Adaptation/FileHandlers/R62/FileRead.cs @@ -35,7 +35,6 @@ public class FileRead : Shared.FileRead, IFileRead string[] segments; Dictionary systemStateToNames = new(); _KeyColumn = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.KeyColumn"); - _KeyColumn = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.SystemState"); _TimestampFormat = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.TimestampFormat"); ModelObjectParameterDefinition[] systemStates = GetProperties(cellInstanceConnectionName, modelObjectParameters, "ProcessDataStandardFormat.SystemState"); foreach (ModelObjectParameterDefinition modelObjectParameterDefinition in systemStates) @@ -139,7 +138,7 @@ public class FileRead : Shared.FileRead, IFileRead private ReadOnlyCollection GetSystemStateValues(List lines, string[] columns, int keyColumnIndex) { - List results = []; + List results = new(); string[] values; string? systemState; string keyColumnValue; @@ -170,9 +169,9 @@ public class FileRead : Shared.FileRead, IFileRead string systemState; int? keyColumnIndex; string checkFileName; - List headerLines = []; + List headerLines = new(); ReadOnlyCollection systemStateValues; - string missingKeyDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, "Missing-Key"); + string missingKeyDirectory = Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, "Missing-Key"); if (!Directory.Exists(missingKeyDirectory)) _ = Directory.CreateDirectory(missingKeyDirectory); string fileName = Path.GetFileName(reportFullPath); @@ -202,18 +201,18 @@ public class FileRead : Shared.FileRead, IFileRead keyColumnIndex = GetKeyColumnIndex(columns, _KeyColumn); if (keyColumnIndex is null) { - File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.SourceFileLocation, missingKeyDirectory, fileName)); + File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, missingKeyDirectory, fileName)); continue; } systemStateValues = GetSystemStateValues(lines, columns, keyColumnIndex.Value); if (systemStateValues.Count == 0) { - File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.SourceFileLocation, missingKeyDirectory, fileName)); + File.Move(reportFullPath, Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, missingKeyDirectory, fileName)); continue; } lines.AddRange(headerLines); - systemState = string.Join('-', systemStateValues); - checkFileName = Path.Combine(Path.GetDirectoryName(reportFullPath) ?? throw new Exception(), $"{equipment}-{timestamp}-{systemState}.pdsf"); + systemState = string.Join("-", systemStateValues); + checkFileName = Path.Combine(_FileConnectorConfiguration.AlternateTargetFolder, $"{equipment}-{timestamp}-{systemState}.pdsf"); File.WriteAllLines(checkFileName, lines); // File.Delete(reportFullPath); if (DateTime.TryParseExact(timestamp, _TimestampFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime)) diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/DEP08CEPIEPSILON.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/DEP08CEPIEPSILON.cs index edbb962..3b7c39a 100644 --- a/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/DEP08CEPIEPSILON.cs +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.56.0/DEP08CEPIEPSILON.cs @@ -1,4 +1,4 @@ -#if true +#if v2_56_0 using Adaptation._Tests.Shared; using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -19,7 +19,7 @@ public class DEP08CEPIEPSILON : EAFLoggingUnitTesting internal static string DummyRoot { get; private set; } internal static DEP08CEPIEPSILON EAFLoggingUnitTesting { get; private set; } - static DEP08CEPIEPSILON() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy"; + static DEP08CEPIEPSILON() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; public DEP08CEPIEPSILON() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) { @@ -48,9 +48,7 @@ public class DEP08CEPIEPSILON : EAFLoggingUnitTesting EAFLoggingUnitTesting?.Dispose(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R32() { @@ -61,9 +59,7 @@ public class DEP08CEPIEPSILON : EAFLoggingUnitTesting EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R62() { diff --git a/Adaptation/_Tests/CreateSelfDescription/Production/v2.57.0/DEP08CEPIEPSILON.cs b/Adaptation/_Tests/CreateSelfDescription/Production/v2.57.0/DEP08CEPIEPSILON.cs new file mode 100644 index 0000000..d8ed20e --- /dev/null +++ b/Adaptation/_Tests/CreateSelfDescription/Production/v2.57.0/DEP08CEPIEPSILON.cs @@ -0,0 +1,74 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Microsoft.Extensions.Logging; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; + +namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0; + +[TestClass] +public class DEP08CEPIEPSILON : EAFLoggingUnitTesting +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + internal static string DummyRoot { get; private set; } + internal static DEP08CEPIEPSILON EAFLoggingUnitTesting { get; private set; } + + static DEP08CEPIEPSILON() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy"; + + public DEP08CEPIEPSILON() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false) + { + if (EAFLoggingUnitTesting is null) + throw new Exception(); + } + + public DEP08CEPIEPSILON(TestContext testContext) : base(DummyRoot, testContext, new StackFrame().GetMethod().DeclaringType, skipEquipmentDictionary: false) + { + } + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + EAFLoggingUnitTesting ??= new DEP08CEPIEPSILON(testContext); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(testContext.TestName, " - ClassInitialize")); + string[] fileNameAndText = EAFLoggingUnitTesting.AdaptationTesting.GetCSharpText(testContext.TestName); + File.WriteAllText(fileNameAndText[0], fileNameAndText[1]); + File.WriteAllText(fileNameAndText[2], fileNameAndText[3]); + } + + [ClassCleanup()] + public static void ClassCleanup() + { + EAFLoggingUnitTesting.Logger?.LogInformation("Cleanup"); + EAFLoggingUnitTesting?.Dispose(); + } + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R32() + { + string check = "T27*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R62() + { + string check = "T41*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration")); + _ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting); + EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Extract/Production/v2.56.0/DEP08CEPIEPSILON.cs b/Adaptation/_Tests/Extract/Production/v2.56.0/DEP08CEPIEPSILON.cs index 7d46995..f2d62bf 100644 --- a/Adaptation/_Tests/Extract/Production/v2.56.0/DEP08CEPIEPSILON.cs +++ b/Adaptation/_Tests/Extract/Production/v2.56.0/DEP08CEPIEPSILON.cs @@ -1,4 +1,4 @@ -#if true +#if v2_56_0 using Adaptation._Tests.Shared; using Adaptation.Shared; using Adaptation.Shared.Methods; @@ -32,15 +32,11 @@ public class DEP08CEPIEPSILON catch (Exception) { } } -#if DEBUG [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R32() => _DEP08CEPIEPSILON.Production__v2_56_0__DEP08CEPIEPSILON__R32(); -#if (!DEBUG) [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R32638594189939758135__First() { @@ -54,15 +50,11 @@ public class DEP08CEPIEPSILON NonThrowTryCatch(); } -#if DEBUG [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R62() => _DEP08CEPIEPSILON.Production__v2_56_0__DEP08CEPIEPSILON__R62(); -#if (!DEBUG) [Ignore] -#endif [TestMethod] public void Production__v2_56_0__DEP08CEPIEPSILON__R62638594189939758135__First() { diff --git a/Adaptation/_Tests/Extract/Production/v2.57.0/DEP08CEPIEPSILON.cs b/Adaptation/_Tests/Extract/Production/v2.57.0/DEP08CEPIEPSILON.cs new file mode 100644 index 0000000..be19199 --- /dev/null +++ b/Adaptation/_Tests/Extract/Production/v2.57.0/DEP08CEPIEPSILON.cs @@ -0,0 +1,72 @@ +#if v2_57_0 +using Adaptation._Tests.Shared; +using Adaptation.Shared; +using Adaptation.Shared.Methods; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Diagnostics; +using System.Reflection; + +namespace Adaptation._Tests.Extract.Production.v2_57_0; + +[TestClass] +public class DEP08CEPIEPSILON +{ + +#pragma warning disable CA2254 +#pragma warning disable IDE0060 + + private static CreateSelfDescription.Production.v2_57_0.DEP08CEPIEPSILON _DEP08CEPIEPSILON; + + [ClassInitialize] + public static void ClassInitialize(TestContext testContext) + { + CreateSelfDescription.Production.v2_57_0.DEP08CEPIEPSILON.ClassInitialize(testContext); + _DEP08CEPIEPSILON = CreateSelfDescription.Production.v2_57_0.DEP08CEPIEPSILON.EAFLoggingUnitTesting; + } + + private static void NonThrowTryCatch() + { + try + { throw new Exception(); } + catch (Exception) { } + } + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R32() => _DEP08CEPIEPSILON.Production__v2_57_0__DEP08CEPIEPSILON__R32(); + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R32638594189939758135__First() + { + string check = "T27*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _DEP08CEPIEPSILON.Production__v2_57_0__DEP08CEPIEPSILON__R32(); + string[] variables = _DEP08CEPIEPSILON.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _DEP08CEPIEPSILON.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R62() => _DEP08CEPIEPSILON.Production__v2_57_0__DEP08CEPIEPSILON__R62(); + + [Ignore] + [TestMethod] + public void Production__v2_57_0__DEP08CEPIEPSILON__R62638594189939758135__First() + { + string check = "T41*.pdsf"; + MethodBase methodBase = new StackFrame().GetMethod(); + _DEP08CEPIEPSILON.Production__v2_57_0__DEP08CEPIEPSILON__R62(); + string[] variables = _DEP08CEPIEPSILON.AdaptationTesting.GetVariables(methodBase, check, validatePDSF: false); + IFileRead fileRead = _DEP08CEPIEPSILON.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false); + Logistics logistics = new(fileRead); + _ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics); + NonThrowTryCatch(); + } + +} +#endif \ No newline at end of file diff --git a/Adaptation/_Tests/Static/DEP08CEPIEPSILON.cs b/Adaptation/_Tests/Static/DEP08CEPIEPSILON.cs index 7319b04..53d0488 100644 --- a/Adaptation/_Tests/Static/DEP08CEPIEPSILON.cs +++ b/Adaptation/_Tests/Static/DEP08CEPIEPSILON.cs @@ -64,7 +64,7 @@ public class DEP08CEPIEPSILON : LoggingUnitTesting, IDisposable StringBuilder results = new(); (string cellInstanceName, string cellInstanceVersionName)[] collection = new (string, string)[] { - new("DEP08CEPIEPSILON", "v2.56.0"), + new("DEP08CEPIEPSILON", "v2.57.0"), }; string production = "http://messa08ec.infineon.com:9003/CellInstanceServiceV2"; Shared.PasteSpecialXml.EAF.XML.API.CellInstance.CellInstanceVersion cellInstanceVersion; diff --git a/DEP08CEPIEPSILON.csproj b/DEP08CEPIEPSILON.csproj index f292644..c94bc13 100644 --- a/DEP08CEPIEPSILON.csproj +++ b/DEP08CEPIEPSILON.csproj @@ -103,7 +103,6 @@ - @@ -159,7 +158,7 @@ - 2.56.0 + 2.57.0 5.2.7 diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index fa6eb34..dbb7388 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.56.0.0")] -[assembly: AssemblyFileVersion("2.56.0.0")] +[assembly: AssemblyVersion("2.57.0.0")] +[assembly: AssemblyFileVersion("2.57.0.0")]