Skip to content

Commit 78914f6

Browse files
committed
Improve feature name readability in conformance reports
Add feature name processing to remove redundant prefixes and improve readability in conformance comparison tables. Changes include: - Remove "HTTPRoute" and "Gateway" prefixes from feature names - Split camelCase words into space-separated words - Add process_feature_name() function for consistent text processing - Update generate_profiles_report() to use processed feature names This makes the conformance reports easier to read
1 parent bdd64d2 commit 78914f6

File tree

4 files changed

+104
-83
lines changed

4 files changed

+104
-83
lines changed

hack/mkdocs-generate-conformance.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,21 @@
1919
from fnmatch import fnmatch
2020
import glob
2121
import os
22+
import re
2223

2324
log = logging.getLogger('mkdocs')
2425

2526

27+
def process_feature_name(feature):
28+
"""
29+
Process feature names by splitting camelCase into space-separated words
30+
"""
31+
# Split camelCase
32+
words = re.findall(r'HTTPRoute|[A-Z]+(?=[A-Z][a-z])|[A-Z][a-z]+|[A-Z\d]+', feature)
33+
# Join words with spaces
34+
return ' '.join(words)
35+
36+
2637
@plugins.event_priority(100)
2738
def on_pre_build(config, **kwargs):
2839
log.info("generating conformance")
@@ -114,7 +125,9 @@ def generate_profiles_report(reports, route,version):
114125
for row in http_table.itertuples():
115126
if type(row._4) is list:
116127
for feat in row._4:
117-
http_table.loc[row.Index, feat] = ':white_check_mark:'
128+
# Process feature name before using it as a column
129+
processed_feat = process_feature_name(feat)
130+
http_table.loc[row.Index, processed_feat] = ':white_check_mark:'
118131
http_table = http_table.fillna(':x:')
119132
http_table = http_table.drop(['extended.supportedFeatures'], axis=1)
120133

0 commit comments

Comments
 (0)