diff --git a/.gitignore b/.gitignore index c19d760..e85055c 100644 --- a/.gitignore +++ b/.gitignore @@ -331,11 +331,11 @@ ASALocalRun/ ## ## Visual Studio Code ## -*/!.vscode/extensions.json -*/!.vscode/launch.json -*/!.vscode/settings.json -*/!.vscode/tasks.json -*/.vscode/* -*/.vscode/ReportGenerator/* +**/.vscode/* +!**/.vscode/extensions.json +!**/.vscode/format-report.json +!**/.vscode/launch.json +!**/.vscode/settings.json +!**/.vscode/tasks.json *.lnk diff --git a/.vscode/settings.json b/.vscode/settings.json index 1708c7e..d907fc2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,7 @@ { + "[markdown]": { + "editor.wordWrap": "off" + }, "cSpell.words": [ "Epuipment", "Idrv", diff --git a/Adaptation/.kanbn/board.css b/Adaptation/.kanbn/board.css new file mode 100644 index 0000000..8bc14b6 --- /dev/null +++ b/Adaptation/.kanbn/board.css @@ -0,0 +1,7 @@ +.kanbn-task-data-workload { + display: none; +} +.kanbn-task-data-relation { + display: block; + color: #198038; +} diff --git a/Adaptation/.kanbn/index.md b/Adaptation/.kanbn/index.md new file mode 100644 index 0000000..349a00b --- /dev/null +++ b/Adaptation/.kanbn/index.md @@ -0,0 +1,21 @@ +--- +type: "kanbn" +created: 2023-07-07T15:37:56.040Z +updated: 2023-07-18T19:52:59.668Z +startedColumns: + - 'In Progress' +completedColumns: + - Done +dateFormat: mm/dd +taskTemplate: '^+^_${overdue ? ''^R'' : ''''}${name}^: ${relations ? (''\n^-^/^g'' + relations.reduce((accumulator, currentValue) => accumulator.task + currentValue.task + '' '', '''')) : ''''}' +--- + +# MET08RESIMAPCDE + +## Backlog + +## Todo + +## In Progress + +## Done diff --git a/Adaptation/.vscode/Reactor.js b/Adaptation/.vscode/Reactor.js deleted file mode 100644 index 4203d40..0000000 --- a/Adaptation/.vscode/Reactor.js +++ /dev/null @@ -1,22 +0,0 @@ -// (self.length != 0) ? -// self : -// (getContextData('2', 'cds.PROCESS_JOBID', '') == '-') ? -// self : -// getContextData('2', 'cds.PROCESS_JOBID', '') - -getValue(self, self.length, $('dcp.CDE5/RsM/MesEntity', ''), $('dcp.CDE5/RsM/Recipe', ''), getContextData('2', 'cds.PROCESS_JOBID', '')); - -function getValue(value, length, mesEntity, recipe, processJobId) { - if (recipe.toUpperCase() === 'STANDARD \\ RLOW_STD') - return mesEntity; - else if (recipe.toUpperCase() === 'STANDARD \\ RMID_STD') - return mesEntity; - else if (recipe.toUpperCase() === 'STANDARD \\ RHI_STD') - return mesEntity; - else if (recipe.toUpperCase() === 'STANDARD \\ THINSPC') - return mesEntity; - else if (length === 0) - return processJobId; - else - return value; -} \ No newline at end of file diff --git a/Adaptation/.vscode/psn.js b/Adaptation/.vscode/psn.js deleted file mode 100644 index 197b19c..0000000 --- a/Adaptation/.vscode/psn.js +++ /dev/null @@ -1,22 +0,0 @@ -// (self.length != 0) ? -// self : -// (getContextData('2', 'cds.PRODUCT', '') == '-') ? -// self : -// getContextData('2', 'cds.PRODUCT', '') - -getValue(self, self.length, getContextData('2', 'cds.PRODUCT', ''), $('dcp.CDE5/RsM/Recipe', '')); - -function getValue(value, length, product, recipe) { - if (recipe.toUpperCase() === 'STANDARD \\ RLOW_STD') - return 'RLOW_STD'; - else if (recipe.toUpperCase() === 'STANDARD \\ RMID_STD') - return 'RMID_STD'; - else if (recipe.toUpperCase() === 'STANDARD \\ RHI_STD') - return 'RHI_STD'; - else if (recipe.toUpperCase() === 'STANDARD \\ THINSPC') - return 'THINSPC'; - else if (length === 0) - return product; - else - return value; -} \ No newline at end of file diff --git a/Adaptation/.vscode/settings.json b/Adaptation/.vscode/settings.json index 7d0fc82..34d066a 100644 --- a/Adaptation/.vscode/settings.json +++ b/Adaptation/.vscode/settings.json @@ -1,4 +1,7 @@ { + "[markdown]": { + "editor.wordWrap": "off" + }, "cSpell.words": [ "datauniqueid", "Epuipment", diff --git a/Adaptation/.vscode/tasks.json b/Adaptation/.vscode/tasks.json index 6f47439..f09b6bf 100644 --- a/Adaptation/.vscode/tasks.json +++ b/Adaptation/.vscode/tasks.json @@ -2,41 +2,81 @@ "version": "2.0.0", "tasks": [ { - "label": "build", + "label": "Build", "command": "dotnet", "type": "process", "args": [ "build", - "${workspaceFolder}/MET08RESIMAPCDE.Tests.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], "problemMatcher": "$msCompile" }, { - "label": "publish", + "label": "Format", "command": "dotnet", "type": "process", "args": [ - "publish", - "${workspaceFolder}/MET08RESIMAPCDE.Tests.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "format", + "--report", + ".vscode", + "--verbosity", + "detailed", + "--severity", + "warn" ], "problemMatcher": "$msCompile" }, { - "label": "watch", + "label": "Nuget Clear", "command": "dotnet", "type": "process", "args": [ - "watch", - "run", - "${workspaceFolder}/MET08RESIMAPCDE.Tests.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" + "nuget", + "locals", + "all", + "--clear" ], "problemMatcher": "$msCompile" + }, + { + "label": "MSBuild for EAF Deployment Packages", + "command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe", + "type": "process", + "args": [ + "/target:Build", + "/restore:True", + "/p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json%3Bhttps://localhost/v3/index.json", + "/detailedsummary", + "/consoleloggerparameters:PerformanceSummary;ErrorsOnly;", + "/property:Configuration=Debug;TargetFrameworkVersion=v4.8", + "../MET08RESIMAPCDE.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "File-Folder-Helper AOT s M .Kanbn Tasks", + "type": "shell", + "command": "& L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net7.0/win-x64/publish/File-Folder-Helper.exe s M T:/MET08RESIMAPCDE/06_SourceCode/MET08RESIMAPCDE/Adaptation -s T:/MET08RESIMAPCDE/06_SourceCode/MET08RESIMAPCDE/Adaptation/.kanbn/tasks", + "problemMatcher": [] + }, + { + "label": "Kanbn Console", + "type": "npm", + "script": "kanbn.board", + "problemMatcher": [] + }, + { + "label": "Kanbn Write Boad", + "type": "shell", + "command": "& kanbn board -j | L:/Git/kanbn2md/kanbn2md.exe >.kanbn/board.md", + "problemMatcher": [] + }, + { + "label": "Kanbn Write json", + "type": "npm", + "script": "kanbn.board.json", + "problemMatcher": [] } ] } \ No newline at end of file diff --git a/Adaptation/FileHandlers/OpenInsight/FileRead.cs b/Adaptation/FileHandlers/OpenInsight/FileRead.cs index 5e64512..9bb1495 100644 --- a/Adaptation/FileHandlers/OpenInsight/FileRead.cs +++ b/Adaptation/FileHandlers/OpenInsight/FileRead.cs @@ -155,13 +155,19 @@ public class FileRead : Shared.FileRead, IFileRead { bool isDummyRun = false; List<(Shared.Properties.IScopeInfo, string)> collection = new(); - string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; - string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation); - if (parentParent.Contains(_CellInstanceName)) - parentParent = Path.GetDirectoryName(parentParent); - string duplicateDirectory = Path.Combine(parentParent, "Data"); + string duplicateDirectory = Path.Combine(_FileConnectorConfiguration.SourceFileLocation, _CellInstanceName); if (!Directory.Exists(duplicateDirectory)) _ = Directory.CreateDirectory(duplicateDirectory); + string successDirectory = _FileConnectorConfiguration.AlternateTargetFolder; + if (!Directory.Exists(Path.Combine(duplicateDirectory, "1"))) + { + string parentParent = GetParentParent(_FileConnectorConfiguration.SourceFileLocation); + if (parentParent.Contains(_CellInstanceName)) + parentParent = Path.GetDirectoryName(parentParent); + duplicateDirectory = Path.Combine(parentParent, "Data"); + if (!Directory.Exists(duplicateDirectory)) + _ = Directory.CreateDirectory(duplicateDirectory); + } string duplicateFile = Path.Combine(duplicateDirectory, Path.GetFileName(reportFullPath)); if (descriptions.Any() && tests.Any()) { diff --git a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs index df3a8f4..acaa764 100644 --- a/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs +++ b/Adaptation/FileHandlers/OpenInsightMetrologyViewer/WSRequest.cs @@ -27,7 +27,7 @@ public class WSRequest public string EquipId { get; set; } public string FileName { get; set; } public string FilePath { get; set; } - public string Id { get; set; } + public int Id { get; set; } public string Layer { get; set; } public string LotId { get; set; } public string Op { get; set; } @@ -52,7 +52,7 @@ public class WSRequest #pragma warning restore IDE0060 { ProcessDataStandardFormat = processDataStandardFormat; - Id = "-1"; + Id = -1; CellName = logistics.MesEntity; Details = new List(); if (descriptions[0] is not txt.Description x) diff --git a/Adaptation/Shared/FileRead.cs b/Adaptation/Shared/FileRead.cs index 90ed6e6..f66b29b 100644 --- a/Adaptation/Shared/FileRead.cs +++ b/Adaptation/Shared/FileRead.cs @@ -260,10 +260,11 @@ public class FileRead : Properties.IFileRead return results; } - protected static string GetTupleFile(Logistics logistics, List descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory) where T : Properties.IDescription + protected static string GetTupleFile(Logistics logistics, List descriptions, Properties.IScopeInfo scopeInfo, string duplicateDirectory, string duplicateFile) where T : Properties.IDescription { string result; string rds; + string fileName; string dateValue; string rdsPlaceholder = "%RDS%"; string mesEntityPlaceholder = "%MesEntity%"; @@ -285,7 +286,11 @@ public class FileRead : Properties.IFileRead continue; datePlaceholder = string.Concat('%', segment, '%'); } - result = string.Concat(duplicateDirectory, @"\", scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue)); + fileName = scopeInfo.FileName.Replace(rdsPlaceholder, rds).Replace(mesEntityPlaceholder, logistics.MesEntity).Replace(datePlaceholder, dateValue); + if (!duplicateFile.Contains("Viewer")) + result = Path.Combine(duplicateDirectory, fileName); + else + result = Path.Combine(duplicateDirectory, $"Viewer_{fileName}"); } if (result.Contains('%')) throw new Exception("Placeholder exists!"); @@ -318,7 +323,7 @@ public class FileRead : Properties.IFileRead else if (!scopeInfo.FileName.Contains('%')) tupleFile = string.Concat(duplicateDirectory, @"\", fileName, "_", scopeInfo.FileNameWithoutExtension, ".pdsfc"); else - tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory); + tupleFile = GetTupleFile(logistics, descriptions, scopeInfo, duplicateDirectory, duplicateFile); tupleFileName = Path.GetFileNameWithoutExtension(tupleFile).Split('.')[0]; duplicateFiles.Add(tupleFile); if (_IsEAFHosted) diff --git a/Adaptation/_Tests/Extract/Staging/v2.49.2/CDE6-EQPT.cs b/Adaptation/_Tests/Extract/Staging/v2.49.2/CDE6-EQPT.cs index f7243b8..1161741 100644 --- a/Adaptation/_Tests/Extract/Staging/v2.49.2/CDE6-EQPT.cs +++ b/Adaptation/_Tests/Extract/Staging/v2.49.2/CDE6-EQPT.cs @@ -38,7 +38,7 @@ public class CDE6_EQPT MethodBase methodBase = new StackFrame().GetMethod(); _CDE6_EQPT.Staging__v2_49_2__CDE6_EQPT__DownloadRsMFile(); _ = _CDE6_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF); - for (int i = 0; i < int.MinValue; i++) + for (int i = 0; i < int.MaxValue; i++) Thread.Sleep(500); } diff --git a/Adaptation/package.json b/Adaptation/package.json index 0eb4f09..c720576 100644 --- a/Adaptation/package.json +++ b/Adaptation/package.json @@ -16,14 +16,8 @@ "HB-Extract.Staging.v2_47_1-MET08RESIMAPCDE-Staging__v2_47_1__MET08RESIMAPCDE__OpenInsight638054501710000000__IqsSql": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_1 & ClassName~MET08RESIMAPCDE & Name~Staging__v2_47_1__MET08RESIMAPCDE__OpenInsight638054501710000000__IqsSql\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "HC-Extract.Staging.v2_47_2-CDE6-Staging__v2_47_2__CDE6__RsM638065099250000000__Normal": "dotnet test --filter \"FullyQualifiedName~Adaptation._Tests.Extract.Staging.v2_47_2 & ClassName~CDE6 & Name~Staging__v2_47_2__CDE6__RsM638065099250000000__Normal\" -- TestRunParameters.Parameter(name=\\\"WaitFor\\\", value=\\\"Debugger.IsAttached\\\")", "Alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "nuget-clear": "dotnet nuget locals all --clear", - "build": "dotnet build --runtime win-x64 --self-contained", - "build-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://packagemanagement.eu.infineon.com:4430/api/v2/", - "build-nuget-And-Package-Management": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/", - "build-All-Sources": "dotnet build --runtime win-x64 --self-contained --source https://api.nuget.org/v3/index.json --source https://packagemanagement.eu.infineon.com:4430/api/v2/ --source https://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json --source http://192.168.0.73:5002/v3/index.json", - "dotnet-format": "dotnet format --report .vscode --verbosity detailed --severity warn", - "MSBuild": "\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe\" /target:Build /restore:True /p:RestoreSources=https://api.nuget.org/v3/index.json%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://tfs.intra.infineon.com/tfs/ManufacturingIT/_packaging/eaf/nuget/v3/index.json /detailedsummary /consoleloggerparameters:PerformanceSummary;ErrorsOnly; /property:Configuration=Debug;TargetFrameworkVersion=v4.8 ../MET08RESIMAPCDE.csproj", - "pull": "git pull", + "kanbn.board": "kanbn board", + "kanbn.board.json": "kanbn board -j > .kanbn/board.json", "garbage-collect": "git gc" } } \ No newline at end of file