Refactor QS408M and PDSF File Handlers

- Updated Detail class to include JsonSourceGenerationOptions and JsonSerializable attributes for source generation.
- Modified ProcessData class to utilize source generation context for Description deserialization.
- Renamed RowSourceGenerationContext to QS408MRowSourceGenerationContext for clarity.
- Updated Run class to use QS408MRunSourceGenerationContext for serialization.
- Enhanced Description class with source generation attributes.
- Refactored FileRead class to use source generation context for Description deserialization.
- Added new methods in ProcessDataStandardFormat for JSON element array extraction.
- Introduced new PDSF file handler classes: Body, Constant, FileRead, Footer, Header, Row, Run, and Site.
- Implemented logic for parsing and handling PDSF data structures.
- Added unit tests for PDSF processing to ensure functionality.
This commit is contained in:
2025-09-15 11:37:05 -07:00
parent 515df7ec37
commit d07755c3a0
29 changed files with 869 additions and 204 deletions

View File

@ -1,4 +1,5 @@
#if true
using Adaptation._Tests.Shared;
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@ -31,15 +32,11 @@ public class BIORAD2
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M() => _BIORAD2.Production__v2_60_0__BIORAD2__QS408M();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M638185231662401081__NinePoint()
{
@ -55,13 +52,11 @@ public class BIORAD2
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M638185291035612698__FourteenPoint()
{
@ -77,13 +72,11 @@ public class BIORAD2
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M638206292859940029__EpiPro()
{
@ -99,13 +92,11 @@ public class BIORAD2
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M638211310710952565__WMO()
{
@ -121,13 +112,11 @@ public class BIORAD2
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__QS408M638635290101315251__ADO126448()
{
@ -143,7 +132,24 @@ public class BIORAD2
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
dateTime = FileHandlers.QS408M.ProcessData.GetDateTime(logistics, tickOffset: 0, dateTimeText: "Tue Nov 10 12:03:56 1970");
Assert.AreEqual(logistics.DateTimeFromSequence, dateTime);
_ = Shared.AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD2__pdsf638925042012952259__Normal()
{
bool validatePDSF = false;
string check = "*EQP_*.pdsf";
_BIORAD2.Production__v2_60_0__BIORAD2__pdsf();
MethodBase methodBase = new StackFrame().GetMethod();
string[] variables = _BIORAD2.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BIORAD2.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Logistics logistics = new(fileRead);
_ = AdaptationTesting.ReExtractCompareUpdatePassDirectory(variables, fileRead, logistics, validatePDSF);
NonThrowTryCatch();
}

View File

@ -31,15 +31,11 @@ public class BIORAD3
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD3__QS408M() => _BIORAD3.Production__v2_60_0__BIORAD3__QS408M();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD3__QS408M637406016892454000__ReactorAndRDS()
{
@ -59,9 +55,7 @@ public class BIORAD3
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_60_0__BIORAD3__QS408M638227775101723135__Error()
{