From a361474e2d3fa4b50912a899d4d462800b2483b8 Mon Sep 17 00:00:00 2001 From: Zhirong Zhang <zhirong.zhang@cern.ch> Date: Thu, 24 Oct 2024 13:43:02 -0700 Subject: [PATCH] modify the flex registration function to accommodate for flex thickness and has interposer --- database/pwbdbtools.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/database/pwbdbtools.py b/database/pwbdbtools.py index bbe6f9b..6a121b2 100644 --- a/database/pwbdbtools.py +++ b/database/pwbdbtools.py @@ -208,9 +208,15 @@ def getLatestTestRunByComponent(client, component, testType, stage=None): return testRun -def registerFlexArray(client, panelid, flex_batch, arr_type='PB_FLEX_ARRAY_3V2'): +def registerFlexArray(client, panelid, flex_batch, arr_type='PB_FLEX_ARRAY_3V2', flex_thickness = None, has_interposer = None): version, batch, number = parse_serial(panelid, fullsn=False) + properties_lib = {'VERSION':str(version), 'BATCH':batch, 'NUMBER':number} + if flex_thickness is not None: + properties_lib.update({'FLEX_THICKNESS': flex_thickness}) + if has_interposer is not None: + properties_lib.update({'HAS_INTERPOSER': has_interposer}) + regdata = { 'project':'S', 'subproject':'SB', @@ -219,7 +225,7 @@ def registerFlexArray(client, panelid, flex_batch, arr_type='PB_FLEX_ARRAY_3V2') 'type':arr_type, 'serialNumber':'20USBPF'+panelid, 'batches':{'PWB_FLEX_BATCH':flex_batch}, - 'properties':{'VERSION':str(version), 'BATCH':batch, 'NUMBER':number} + 'properties': properties_lib } client.post('registerComponent', json=regdata) -- GitLab