@@ -57,18 +57,18 @@ def generate_conformance_tables(reports, currVersion):
57
57
gateway_grpc_table = pandas .DataFrame ()
58
58
59
59
if currVersion != 'v1.0.0' :
60
- gateway_http_table = generate_profiles_report (reports , 'GATEWAY-HTTP' )
60
+ gateway_http_table = generate_profiles_report (reports , 'GATEWAY-HTTP' , currVersion )
61
61
62
- gateway_grpc_table = generate_profiles_report (reports , 'GATEWAY-GRPC' )
62
+ gateway_grpc_table = generate_profiles_report (reports , 'GATEWAY-GRPC' , currVersion )
63
63
gateway_grpc_table = gateway_grpc_table .rename_axis ('Organization' )
64
64
65
- gateway_tls_table = generate_profiles_report (reports , 'GATEWAY-TLS' )
65
+ gateway_tls_table = generate_profiles_report (reports , 'GATEWAY-TLS' , currVersion )
66
66
gateway_tls_table = gateway_tls_table .rename_axis ('Organization' )
67
67
68
- mesh_http_table = generate_profiles_report (reports , 'MESH-HTTP' )
68
+ mesh_http_table = generate_profiles_report (reports , 'MESH-HTTP' , currVersion )
69
69
else :
70
- gateway_http_table = generate_profiles_report (reports , "HTTP" )
71
- mesh_http_table = generate_profiles_report (reports , "MESH" )
70
+ gateway_http_table = generate_profiles_report (reports , "HTTP" , currVersion )
71
+ mesh_http_table = generate_profiles_report (reports , "MESH" , currVersion )
72
72
73
73
gateway_http_table = gateway_http_table .rename_axis ('Organization' )
74
74
mesh_http_table = mesh_http_table .rename_axis ('Organization' )
@@ -97,29 +97,31 @@ def generate_conformance_tables(reports, currVersion):
97
97
f .write (mesh_http_table .to_markdown ())
98
98
99
99
100
- def generate_profiles_report (reports , route ):
100
+ def generate_profiles_report (reports , route , version ):
101
101
102
102
http_reports = reports .loc [reports ["name" ] == route ]
103
103
http_reports .set_index ('organization' )
104
104
http_reports .sort_values (['organization' , 'version' ], inplace = True )
105
105
106
106
http_table = pandas .DataFrame (
107
107
columns = http_reports ['organization' ])
108
+
108
109
http_table = http_reports [['organization' , 'project' ,
109
- 'version' , 'extended.supportedFeatures' ]].T
110
+ 'version' ,'mode' , 'extended.supportedFeatures' ]].T
110
111
http_table .columns = http_table .iloc [0 ]
111
112
http_table = http_table [1 :].T
112
113
113
114
for row in http_table .itertuples ():
114
- if type (row ._3 ) is list :
115
- for feat in row ._3 :
115
+ if type (row ._4 ) is list :
116
+ for feat in row ._4 :
116
117
http_table .loc [row .Index , feat ] = ':white_check_mark:'
117
118
http_table = http_table .fillna (':x:' )
118
119
http_table = http_table .drop (['extended.supportedFeatures' ], axis = 1 )
119
120
120
121
http_table = http_table .rename (
121
- columns = {"project" : "Project" , "version" : "Version" })
122
-
122
+ columns = {"project" : "Project" , "version" : "Version" , "mode" :"Mode" })
123
+ if version == 'v1.0.0' :
124
+ http_table = http_table .drop (columns = ["Mode" ])
123
125
return http_table
124
126
125
127
@@ -149,7 +151,7 @@ def getYaml(conf_path):
149
151
150
152
x = load_yaml (p )
151
153
profiles = pandas .json_normalize (
152
- x , record_path = 'profiles' , meta = ["implementation" ])
154
+ x , record_path = [ 'profiles' ] , meta = ["mode" , " implementation" ], errors = 'ignore' )
153
155
154
156
implementation = pandas .json_normalize (profiles .implementation )
155
157
yamls .append (pandas .concat ([implementation , profiles ], axis = 1 ))
0 commit comments