@@ -404,7 +404,7 @@ def create_summary_worksheet(self, name: str = 'Summary'):
404404 # rows.
405405 # The tables leave the first column (value 0) as gap
406406 self .add_data_summary_worksheet (
407- starting_row = 9 ,
407+ starting_row = 11 ,
408408 starting_column = 1 ,
409409 worksheet = summary_worksheet )
410410 # After having all data that may have an unknown length, we call
@@ -752,20 +752,10 @@ def add_data_summary_worksheet(self,
752752 'Product' , self .__formats ['bold_w_border' ])
753753 worksheet .write (
754754 current_row , current_column + 2 ,
755- 'Tests Passed ' , self .__formats ['bold_w_border' ])
755+ 'Product Coverage ' , self .__formats ['bold_w_border' ])
756756 worksheet .write (
757757 current_row , current_column + 3 ,
758- 'Supported Tests' , self .__formats ['bold_w_border' ])
759- worksheet .write (
760- current_row , current_column + 4 ,
761- 'Supported Tests Passed' , self .__formats ['bold_w_border' ])
762- worksheet .write (
763- current_row , current_column + 5 ,
764- 'Vendor Coverage' , self .__formats ['bold_w_border' ])
765- worksheet .write (
766- current_row , current_column + 6 ,
767- 'Vendor Coverage Passed' , self .__formats ['bold_w_border' ])
768-
758+ 'Total Tests' , self .__formats ['bold_w_border' ])
769759
770760 current_row += 1
771761
@@ -781,65 +771,42 @@ def add_data_summary_worksheet(self,
781771 current_row , current_column + 1 ,
782772 product_name ,
783773 self .__formats ['bold_w_border' ])
784- # test passed
785- worksheet .write (
786- current_row , current_column + 2 ,
787- str (value .get_passed_tests ()) + ' / ' +
788- str (value .get_total_tests ()),
789- self .get_format_color (value .get_passed_tests (),
790- value .get_total_tests ()))
791- # supported tests
792- worksheet .write (
793- current_row , current_column + 3 ,
794- str (value .get_supported_tests ()) + ' / ' +
795- str (value .get_total_tests ()),
796- self .__formats ['result_yellow' ] if value .get_unsupported_tests () > 0
797- else self .__formats ['result_green' ])
798- # supported tests passed
799- worksheet .write (
800- current_row , current_column + 4 ,
801- str (value .get_passed_tests ()) + ' / ' +
802- str (value .get_supported_tests ()),
803- self .get_format_color (value .get_passed_tests (),
804- value .get_supported_tests ()))
805774
806775 # vendor coverage
807776
808777 # for the vendor coverage, we need to find the right data in the
809778 # product_summary_dict, which is the one with the same product as
810779 # publisher and subscriber
811- for key , value in self .__data .product_summary_dict .items ():
812- if product_name == key [0 ] and product_name == key [1 ]:
813- vendor_coverage_supported_tests = value .get_supported_tests ()
814- vendor_coverage_total_tests = value .get_total_tests ()
815- vendor_coverage_passed_tests = value .get_passed_tests ()
780+ for product_key , product_value in self .__data .product_summary_dict .items ():
781+ if product_name == product_key [0 ] and product_name == product_key [1 ]:
782+ product_coverage_supported_tests = product_value .get_supported_tests ()
783+ product_coverage_total_tests = product_value .get_total_tests ()
784+ product_coverage_passed_tests = product_value .get_passed_tests ()
816785
817786 # vendor coverage
818787 worksheet .write (
819- current_row , current_column + 5 ,
820- str (vendor_coverage_supported_tests ) + ' / ' +
821- str (vendor_coverage_total_tests ),
822- self .get_format_color (
823- vendor_coverage_supported_tests ,
824- vendor_coverage_total_tests ))
825- # vendor coverage passed
826- worksheet .write (
827- current_row , current_column + 6 ,
828- str (vendor_coverage_passed_tests ) + ' / ' +
829- str (vendor_coverage_supported_tests ),
788+ current_row , current_column + 2 ,
789+ str (product_coverage_passed_tests ) + ' / ' +
790+ str (product_coverage_supported_tests ) + ' / ' +
791+ str (product_coverage_total_tests ),
830792 self .get_format_color (
831- vendor_coverage_passed_tests ,
832- vendor_coverage_supported_tests ))
793+ product_coverage_supported_tests ,
794+ product_coverage_total_tests ))
795+
796+ # total tests
797+ worksheet .write (
798+ current_row , current_column + 3 ,
799+ str (value .get_passed_tests ()) + ' / ' +
800+ str (value .get_supported_tests ()) + ' / ' +
801+ str (value .get_total_tests ()),
802+ self .get_format_color (
803+ value .get_passed_tests (), value .get_supported_tests ()))
833804
834805 current_row += 1
835806
836807
837808 # Add 2 rows of gap for the next table
838809 current_row += 2
839- worksheet .write (
840- current_row , current_column ,
841- 'Test Result: passed / supported / total' , self .__formats ['bold_w_border' ])
842- current_row += 1
843810 worksheet .write (
844811 current_row , current_column ,
845812 'Publisher (row)/Subscriber (column)' , self .__formats ['bold_w_border' ])
@@ -856,7 +823,7 @@ def add_data_summary_worksheet(self,
856823
857824 # Add the table passed_tests/total_tests with all combinations of product
858825 # as publishers and as subscribers
859- for (publisher_name , subscriber_name ), value in self .__data .product_summary_dict .items ():
826+ for (publisher_name , subscriber_name ), product_value in self .__data .product_summary_dict .items ():
860827 # if the publisher hasn't been already processed yet, determine
861828 # what is the process_row by selecting the next free row
862829 # (current_row+1)
@@ -886,10 +853,10 @@ def add_data_summary_worksheet(self,
886853 process_column = column_dict [subscriber_name ]
887854
888855 worksheet .write (process_row , process_column ,
889- str (value .get_passed_tests ()) + ' / ' +
890- str (value .get_supported_tests ()) + ' / ' +
891- str (value .get_total_tests ()),
892- self .get_format_color (value .get_passed_tests (), value .get_supported_tests ()))
856+ str (product_value .get_passed_tests ()) + ' / ' +
857+ str (product_value .get_supported_tests ()) + ' / ' +
858+ str (product_value .get_total_tests ()),
859+ self .get_format_color (product_value .get_passed_tests (), product_value .get_supported_tests ()))
893860
894861 def add_static_data_summary_worksheet (self ,
895862 worksheet : xlsxwriter .Workbook .worksheet_class ,
@@ -922,10 +889,9 @@ def add_static_data_summary_worksheet(self,
922889 worksheet .insert_image (
923890 row = current_row , col = starting_column ,
924891 filename = dds_logo_path ,
925- options = {'x_scale' : 0.4 , 'y_scale' : 0.4 , 'decorative' : True , 'object_position' : 2 })
892+ options = {'x_scale' : 0.6 , 'y_scale' : 0.6 , 'decorative' : True , 'object_position' : 2 })
926893
927894 # Add date
928- current_row += 1
929895 worksheet .write (current_row , starting_column + 1 , 'Date' )
930896 date_time = datetime .datetime .now ().strftime ('%Y-%m-%d %H:%M:%S' )
931897 worksheet .write (current_row , starting_column + 2 , date_time )
@@ -953,6 +919,20 @@ def add_static_data_summary_worksheet(self,
953919 worksheet .write (current_row , starting_column + 1 ,'Unique tests count' )
954920 worksheet .write (current_row , starting_column + 2 , test_count )
955921
922+ # add legend
923+ current_row += 1
924+ worksheet .write (current_row , starting_column + 1 ,
925+ 'Test results expressed in: test passed / supported / total' ,
926+ self .__formats ['bold' ])
927+ current_row += 1
928+ worksheet .write (current_row , starting_column + 1 ,
929+ '"Product Coverage" contains information about unique tests supported by product' ,
930+ self .__formats ['bold' ])
931+ current_row += 1
932+ worksheet .write (current_row , starting_column + 1 ,
933+ '"Total Tests" contains all test performed between products as publisher and subscriber' ,
934+ self .__formats ['bold' ])
935+
956936 def add_static_data_description_worksheet (self ,
957937 worksheet : xlsxwriter .Workbook .worksheet_class ,
958938 name : str = 'Test Descriptions' ,
0 commit comments