add sample material column and rewrite inosticID column
This commit is contained in:
@@ -106,7 +106,6 @@ def write_run_doc(dm:dict, path:str):
|
|||||||
wb.close()
|
wb.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
def formatInosticsId(id:str=None, matrl:str=None):
|
def formatInosticsId(id:str=None, matrl:str=None):
|
||||||
iid = id.split("-", 1)[0]
|
iid = id.split("-", 1)[0]
|
||||||
ncd:str = ""
|
ncd:str = ""
|
||||||
@@ -121,8 +120,6 @@ def formatInosticsId(id:str=None, matrl:str=None):
|
|||||||
pass
|
pass
|
||||||
return iid
|
return iid
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> d07459290f0590ab07c6c3fdca43ff95ec80057a
|
|
||||||
def convert_to_numeric(vlu, stndv:float=0.0):
|
def convert_to_numeric(vlu, stndv:float=0.0):
|
||||||
try:
|
try:
|
||||||
return float(vlu)
|
return float(vlu)
|
||||||
@@ -145,10 +142,7 @@ def read_collect_run_doc_name_strids(min_col:int=1, path:str=None):
|
|||||||
InosticsID = None
|
InosticsID = None
|
||||||
CustomerID = None
|
CustomerID = None
|
||||||
PlasmaID = None
|
PlasmaID = None
|
||||||
<<<<<<< HEAD
|
|
||||||
MaterialID = None
|
MaterialID = None
|
||||||
=======
|
|
||||||
>>>>>>> d07459290f0590ab07c6c3fdca43ff95ec80057a
|
|
||||||
InosticsIDKeys = {}
|
InosticsIDKeys = {}
|
||||||
for row in ws.iter_rows(max_row=30, min_col=min_col):
|
for row in ws.iter_rows(max_row=30, min_col=min_col):
|
||||||
for cell in row:
|
for cell in row:
|
||||||
@@ -164,13 +158,10 @@ def read_collect_run_doc_name_strids(min_col:int=1, path:str=None):
|
|||||||
PlasmaID = cell.column
|
PlasmaID = cell.column
|
||||||
continue
|
continue
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
if MaterialID==None and cell.value and isinstance(cell.value, str) and "Sample Material" in cell.value:
|
if MaterialID==None and cell.value and isinstance(cell.value, str) and "Sample Material" in cell.value:
|
||||||
MaterialID = cell.column
|
MaterialID = cell.column
|
||||||
continue
|
continue
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> d07459290f0590ab07c6c3fdca43ff95ec80057a
|
|
||||||
if cell.value and InosticsID == cell.column:
|
if cell.value and InosticsID == cell.column:
|
||||||
InosticsIDKeys[cell.value] = RowModel(cell.coordinate, cell.value)
|
InosticsIDKeys[cell.value] = RowModel(cell.coordinate, cell.value)
|
||||||
rmv:RowModel = InosticsIDKeys[cell.value]
|
rmv:RowModel = InosticsIDKeys[cell.value]
|
||||||
@@ -195,7 +186,6 @@ def read_collect_run_doc_name_strids(min_col:int=1, path:str=None):
|
|||||||
rmv.set_plasmavolml( convert_to_numeric(cell.value) )
|
rmv.set_plasmavolml( convert_to_numeric(cell.value) )
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
if cell.value and MaterialID == cell.column:
|
if cell.value and MaterialID == cell.column:
|
||||||
print(F"{cell.coordinate}:{cell.row}x{cell.column}={cell.value}")
|
print(F"{cell.coordinate}:{cell.row}x{cell.column}={cell.value}")
|
||||||
@@ -205,7 +195,5 @@ def read_collect_run_doc_name_strids(min_col:int=1, path:str=None):
|
|||||||
rmv.set_materialid( cell.value )
|
rmv.set_materialid( cell.value )
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
=======
|
|
||||||
>>>>>>> d07459290f0590ab07c6c3fdca43ff95ec80057a
|
|
||||||
wb.close()
|
wb.close()
|
||||||
return InosticsIDKeys
|
return InosticsIDKeys
|
||||||
|
|||||||
Reference in New Issue
Block a user