Nuget bump, QP oversight and tickOffset

This commit is contained in:
Mike Phares 2023-03-21 09:58:20 -07:00
parent c8e8775eab
commit bc0098bb9b
6 changed files with 37 additions and 13 deletions

View File

@ -254,7 +254,7 @@ public partial class ProcessData : IProcessData
reactor = defaultReactor; reactor = defaultReactor;
else else
reactor = segments[0]; reactor = segments[0];
if (segments.Length <= 1 || !int.TryParse(segments[1], out int rdsValue) || rdsValue < 99) if (segments.Length <= 1 || !int.TryParse(segments[1].Replace("QP", string.Empty), out int rdsValue) || rdsValue < 99)
rds = defaultRDS; rds = defaultRDS;
else else
rds = segments[1]; rds = segments[1];
@ -360,7 +360,7 @@ public partial class ProcessData : IProcessData
segments = cassette.Split(new char[] { '.' }); segments = cassette.Split(new char[] { '.' });
else else
segments = cassette.Split(new char[] { '\u005F' }); segments = cassette.Split(new char[] { '\u005F' });
bool hasRDS = Regex.IsMatch(cassette, "[-]?[0-9]{5,}[-]?"); bool hasRDS = Regex.IsMatch(cassette, "[-]?([QP][0-9]{4,}|[0-9]{5,})[-]?");
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, cassette, segments, hasRDS); (reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, cassette, segments, hasRDS);
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS); (layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS);
zone = GetZone(segments); zone = GetZone(segments);

View File

@ -113,7 +113,7 @@ public class FileRead : Shared.FileRead, IFileRead
string cassetteID; string cassetteID;
string fileNameTemp; string fileNameTemp;
string tupleFileName; string tupleFileName;
DateTime cassetteTicks; DateTime cassetteDateTime;
string directoryName = Path.GetDirectoryName(reportFullPath); string directoryName = Path.GetDirectoryName(reportFullPath);
string sequenceDirectoryName = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _Logistics.Sequence); string sequenceDirectoryName = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _Logistics.Sequence);
string originalDataBioRad = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _OriginalDataBioRad, _Logistics.Sequence, ".txt"); string originalDataBioRad = string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _OriginalDataBioRad, _Logistics.Sequence, ".txt");
@ -132,16 +132,16 @@ public class FileRead : Shared.FileRead, IFileRead
isBioRad = tuple.Item2; isBioRad = tuple.Item2;
dataText = tuple.Item4; dataText = tuple.Item4;
cassetteID = tuple.Item1; cassetteID = tuple.Item1;
cassetteTicks = tuple.Item3; cassetteDateTime = tuple.Item3;
if (isBioRad) if (isBioRad)
tupleFileName = string.Concat("DetailDataBioRad_", cassetteID, "_", cassetteTicks.Ticks, ".txt"); tupleFileName = string.Concat("DetailDataBioRad_", cassetteID, "_", cassetteDateTime.Ticks, ".txt");
else else
tupleFileName = string.Concat("CassetteDataBioRad_", cassetteID, "_", cassetteTicks.Ticks, ".txt"); tupleFileName = string.Concat("CassetteDataBioRad_", cassetteID, "_", cassetteDateTime.Ticks, ".txt");
fileNameTemp = string.Concat(sequenceDirectoryName, @"\", tupleFileName); fileNameTemp = string.Concat(sequenceDirectoryName, @"\", tupleFileName);
File.WriteAllText(fileNameTemp, dataText); File.WriteAllText(fileNameTemp, dataText);
File.SetLastWriteTime(fileNameTemp, cassetteTicks); File.SetLastWriteTime(fileNameTemp, cassetteDateTime);
if (_Logistics.Sequence != cassetteTicks.Ticks && File.Exists(originalDataBioRad)) if (_Logistics.Sequence != cassetteDateTime.Ticks && File.Exists(originalDataBioRad))
File.Copy(originalDataBioRad, string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _OriginalDataBioRad, cassetteTicks.Ticks, ".txt")); File.Copy(originalDataBioRad, string.Concat(Path.GetDirectoryName(reportFullPath), @"\", _OriginalDataBioRad, cassetteDateTime.Ticks, ".txt"));
File.Move(fileNameTemp, string.Concat(directoryName, @"\", tupleFileName)); File.Move(fileNameTemp, string.Concat(directoryName, @"\", tupleFileName));
} }
if (Directory.Exists(sequenceDirectoryName)) if (Directory.Exists(sequenceDirectoryName))

View File

@ -435,7 +435,7 @@ public partial class ProcessData
log.Debug($"****Extract(FDR): DataType = {dataType}"); log.Debug($"****Extract(FDR): DataType = {dataType}");
if (!isBioRad) if (!isBioRad)
{ {
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(i * -1); cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(tickOffset).AddTicks(i * -1);
results.Add(new Tuple<string, bool, DateTime, string>(cassetteID, isBioRad, cassetteDateTime, dataText)); results.Add(new Tuple<string, bool, DateTime, string>(cassetteID, isBioRad, cassetteDateTime, dataText));
} }
else else
@ -452,7 +452,7 @@ public partial class ProcessData
throw new Exception(); throw new Exception();
count += 1; count += 1;
_ = contents.Clear(); _ = contents.Clear();
cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(count * -1); cassetteDateTime = logistics.DateTimeFromSequence.AddTicks(tickOffset).AddTicks(count * -1);
user = processData.Employee?.ToString() ?? ""; user = processData.Employee?.ToString() ?? "";
recipe = detail.Recipe?.ToString() ?? ""; recipe = detail.Recipe?.ToString() ?? "";
_ = contents.Append("Bio-Rad ").Append("QS400MEPI".PadRight(17)).Append("Recipe: ").Append(recipe.PadRight(25)).AppendLine(processData.Date.ToString(Stratus.Description.GetDateFormat())); _ = contents.Append("Bio-Rad ").Append("QS400MEPI".PadRight(17)).Append("Recipe: ").Append(recipe.PadRight(25)).AppendLine(processData.Date.ToString(Stratus.Description.GetDateFormat()));

View File

@ -34,7 +34,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.2.0" /> <PackageReference Include="coverlet.collector" Version="3.2.0" />
<PackageReference Include="FFMpegCore" Version="5.0.2" /> <PackageReference Include="FFMpegCore" Version="5.1.0" />
<PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.AWT.WinForms" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Core" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.Media" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
@ -43,7 +43,7 @@
<PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.OpenJDK.XML.API" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference> <PackageReference Include="IKVM.Runtime" Version="7.2.4630.5"><NoWarn>NU1701</NoWarn></PackageReference>
<PackageReference Include="Instances" Version="3.0.0" /> <PackageReference Include="Instances" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.3" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="7.0.0" />

View File

@ -29,6 +29,22 @@ public class BIORAD4
[TestMethod] [TestMethod]
public void Staging__v2_47_5__BIORAD4__txt() => _BIORAD4.Staging__v2_47_5__BIORAD4__txt(); public void Staging__v2_47_5__BIORAD4__txt() => _BIORAD4.Staging__v2_47_5__BIORAD4__txt();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Staging__v2_47_5__BIORAD4__txt637730081979221342__Normal()
{
bool validatePDSF = false;
string check = "*DataBioRad.txt";
_BIORAD4.Staging__v2_47_5__BIORAD4__txt();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD4.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD4.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
_ = fileRead.ReExtract();
Shared.AdaptationTesting.UpdatePassDirectory(variables[2]);
}
#if DEBUG #if DEBUG
[Ignore] [Ignore]
#endif #endif

View File

@ -164,6 +164,14 @@ public class Stratus : LoggingUnitTesting, IDisposable
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Reactor));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee)); Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
descriptor = FileHandlers.Stratus.ProcessData.GetDescriptor("75-QP1414-SPLIT4");
Assert.IsTrue(!string.IsNullOrEmpty(descriptor.Cassette));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Layer));
Assert.IsTrue(descriptor.PSN is "SPLIT4");
Assert.IsTrue(descriptor.RDS is "QP1414");
Assert.IsTrue(descriptor.Reactor is "75");
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Zone));
Assert.IsTrue(string.IsNullOrEmpty(descriptor.Employee));
LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit")); LoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
} }