lf_csv.py , removed the kpi functionality form csv common library

lf_kpi_csv.py added this file for kpi functionality ,
This file will be the start of a kpi.csv generating library to maintain
format for other scripts

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-10-06 07:06:42 -06:00
parent 7519d18b56
commit f278640d63
2 changed files with 69 additions and 34 deletions

38
py-scripts/lf_csv.py Normal file → Executable file
View File

@@ -42,39 +42,9 @@ class lf_csv:
print(csv_df)
csv_df.to_csv(self.filename, index=False, encoding='utf-8', na_rep='NA', float_format='%.2f')
# this layout may need to change
'''
kpi.csv : specific file that is used for the database, dashboard and blog post
A blank entry is a valid entry in some cases.
Date: date of run
test-rig : testbed that the tests are run on for example ct_us_001
test-tag : test specific information to differenciate the test, LANforge radios used, security modes (wpa2 , open)
dut-hw-version : hardware version of the device under test
dut-sw-version : software version of the device under test
dut-model-num : model number / name of the device under test
test-priority : test-priority is arbitrary number, choosing under 95 means it goes down at bottom of blog report, and higher priority goes at top.
test-id : script or test name , AP Auto, wifi capacity, data plane, dfs
short-description : short description of the test
pass/fail : set blank for performance tests
numeric-score : this is the value for the y-axis (x-axis is a timestamp), numeric value of what was measured
test-details : what was measured in the numeric-score, e.g. bits per second, bytes per second, upload speed, minimum cx time (ms)
Units : units used for the numeric-scort
Graph-Group - For the dashboard the graph / panel to put the resutls in . Currently the dashboard is Grafana
'''
class lf_kpi_csv:
def __init__(self,
_kpi_headers = ['Date','test-rig','test-tag','dut-hw-version','dut-sw-version','dut-model-num',
'test-priority','test-id','short-description','pass/fail','numberic-score'
'test details','Units','Graph-Group','Subtest-Pass','Subtest-Fail'],
_kpi_file='kpi.csv' #Currently this is the only file name accepted
):
self.kpi_headers = _kpi_headers
self.kpi_rows = ""
self.kpi_filename = _kpi_file
if __name__ == "__main__":
def main():
test = lf_csv()
test.generate_csv()
if __name__ == "__main__":
main()