2222import glob
2323import os
2424import re
25+ import semver
2526
2627log = logging .getLogger (f'mkdocs.plugins.{ __name__ } ' )
2728
@@ -149,7 +150,7 @@ def generate_conformance_tables(reports, currVersion, mkdocsConfig):
149150
150151 return new_file
151152
152- def generate_profiles_report (reports , route ,version ):
153+ def generate_profiles_report (reports , route , version ):
153154
154155 http_reports = reports .loc [reports ["name" ] == route ]
155156 http_reports .set_index ('organization' )
@@ -159,21 +160,32 @@ def generate_profiles_report(reports, route,version):
159160 columns = http_reports ['organization' ])
160161
161162 http_table = http_reports [['organization' , 'project' ,
162- 'version' ,'mode' , 'extended.supportedFeatures' ]].T
163+ 'version' , 'mode' , 'core.result ' , 'extended.supportedFeatures' ]].T
163164 http_table .columns = http_table .iloc [0 ]
164165 http_table = http_table [1 :].T
166+ # change core.result value
165167
166168 for row in http_table .itertuples ():
167- if type (row ._4 ) is list :
168- for feat in row ._4 :
169+ if row ._4 == "success" :
170+ http_table .loc [(row .Index , 'core.result' )] = ':white_check_mark:'
171+ else :
172+ http_table .loc [(row .Index , 'core.result' )] = ':x:'
173+
174+ if type (row ._5 ) is list :
175+ for feat in row ._5 :
169176 # Process feature name before using it as a column
170177 processed_feat = process_feature_name (feat )
171- http_table .loc [row .Index , processed_feat ] = ':white_check_mark:'
178+ http_table .loc [(http_table .index == row .Index ) & \
179+ (http_table ['project' ] == row .project ) & \
180+ (http_table ['version' ] == row .version ) & \
181+ (http_table ['mode' ] == row .mode ), processed_feat ] = ':white_check_mark:'
172182 http_table = http_table .fillna (':x:' )
173183 http_table = http_table .drop (['extended.supportedFeatures' ], axis = 1 )
174184
175185 http_table = http_table .rename (
176- columns = {"project" : "Project" , "version" : "Version" , "mode" :"Mode" })
186+ columns = {"project" : "Project" , "version" : "Version" , "mode" : "Mode" , "core.result" : "Core" })
187+ if semver .compare (version .removeprefix ('v' ), '1.3.0' ) < 0 :
188+ http_table = http_table .drop (columns = ["Core" ])
177189 if version == 'v1.0.0' :
178190 http_table = http_table .drop (columns = ["Mode" ])
179191 return http_table
0 commit comments