Skip to content

Commit 6fbbd90

Browse files
authored
Improve feature name readability in conformance reports (#3564)
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 dce6bc4 commit 6fbbd90

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

hack/mkdocs-generate-conformance.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,21 @@
2121
from fnmatch import fnmatch
2222
import glob
2323
import os
24+
import re
2425

2526
log = logging.getLogger(f'mkdocs.plugins.{__name__}')
2627

2728

29+
def process_feature_name(feature):
30+
"""
31+
Process feature names by splitting camelCase into space-separated words
32+
"""
33+
# Split camelCase
34+
words = re.findall(r'HTTPRoute|[A-Z]+(?=[A-Z][a-z])|[A-Z][a-z]+|[A-Z\d]+', feature)
35+
# Join words with spaces
36+
return ' '.join(words)
37+
38+
2839
@plugins.event_priority(100)
2940
def on_files(files, config, **kwargs):
3041
log.info("generating conformance")
@@ -151,7 +162,9 @@ def generate_profiles_report(reports, route,version):
151162
for row in http_table.itertuples():
152163
if type(row._4) is list:
153164
for feat in row._4:
154-
http_table.loc[row.Index, feat] = ':white_check_mark:'
165+
# Process feature name before using it as a column
166+
processed_feat = process_feature_name(feat)
167+
http_table.loc[row.Index, processed_feat] = ':white_check_mark:'
155168
http_table = http_table.fillna(':x:')
156169
http_table = http_table.drop(['extended.supportedFeatures'], axis=1)
157170

site-src/implementations/v1.0.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Implementations only appear in this page if they pass Core conformance for the r
4242

4343
### HTTPRoute
4444

45-
| Organization | Project | Version | HTTPRouteRequestTimeout | HTTPRoutePathRedirect | HTTPRouteRequestMirror | HTTPRoutePathRewrite | HTTPRouteMethodMatching | HTTPRouteRequestMultipleMirrors | HTTPRouteBackendTimeout | HTTPRouteResponseHeaderModification | HTTPRoutePortRedirect | HTTPRouteSchemeRedirect | HTTPRouteHostRewrite | HTTPRouteQueryParamMatching |
46-
|:---------------|:----------|:----------|:--------------------------|:------------------------|:-------------------------|:-----------------------|:--------------------------|:----------------------------------|:--------------------------|:--------------------------------------|:------------------------|:--------------------------|:-----------------------|:------------------------------|
47-
| istio | istio | 1.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
48-
| kumahq | kuma | 2.6.0 | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
45+
| Organization | Project | Version | HTTPRoute Request Timeout | HTTPRoute Path Redirect | HTTPRoute Request Mirror | HTTPRoute Path Rewrite | HTTPRoute Method Matching | HTTPRoute Request Multiple Mirrors | HTTPRoute Backend Timeout | HTTPRoute Response Header Modification | HTTPRoute Port Redirect | HTTPRoute Scheme Redirect | HTTPRoute Host Rewrite | HTTPRoute Query Param Matching |
46+
|:---------------|:----------|:----------|:----------------------------|:--------------------------|:---------------------------|:-------------------------|:----------------------------|:-------------------------------------|:----------------------------|:-----------------------------------------|:--------------------------|:----------------------------|:-------------------------|:---------------------------------|
47+
| istio | istio | 1.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
48+
| kumahq | kuma | 2.6.0 | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

site-src/implementations/v1.1.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Implementations only appear in this page if they pass Core conformance for the r
5959

6060
### HTTPRoute
6161

62-
| Organization | Project | Version | Mode | HTTPRouteBackendProtocolH2C | HTTPRouteBackendProtocolWebSocket | HTTPRouteBackendRequestHeaderModification | HTTPRouteBackendTimeout | HTTPRouteHostRewrite | HTTPRouteMethodMatching | HTTPRoutePathRedirect | HTTPRoutePathRewrite | HTTPRoutePortRedirect | HTTPRouteQueryParamMatching | HTTPRouteRequestMirror | HTTPRouteRequestMultipleMirrors | HTTPRouteRequestTimeout | HTTPRouteResponseHeaderModification | HTTPRouteSchemeRedirect | MeshClusterIPMatching | MeshConsumerRoute | HTTPRouteParentRefPort |
63-
|:---------------|:----------|:----------|:--------|:------------------------------|:------------------------------------|:--------------------------------------------|:--------------------------|:-----------------------|:--------------------------|:------------------------|:-----------------------|:------------------------|:------------------------------|:-------------------------|:----------------------------------|:--------------------------|:--------------------------------------|:--------------------------|:------------------------|:--------------------|:-------------------------|
64-
| cilium | cilium | v1.16.0 | default | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
65-
| istio | istio | 1.22 | default | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
62+
| Organization | Project | Version | Mode | HTTPRoute Backend Protocol H2C | HTTPRoute Backend Protocol Web Socket | HTTPRoute Backend Request Header Modification | HTTPRoute Backend Timeout | HTTPRoute Host Rewrite | HTTPRoute Method Matching | HTTPRoute Path Redirect | HTTPRoute Path Rewrite | HTTPRoute Port Redirect | HTTPRoute Query Param Matching | HTTPRoute Request Mirror | HTTPRoute Request Multiple Mirrors | HTTPRoute Request Timeout | HTTPRoute Response Header Modification | HTTPRoute Scheme Redirect | Mesh Cluster IP Matching | Mesh Consumer Route | HTTPRoute Parent Ref Port |
63+
|:---------------|:----------|:----------|:--------|:---------------------------------|:----------------------------------------|:------------------------------------------------|:----------------------------|:-------------------------|:----------------------------|:--------------------------|:-------------------------|:--------------------------|:---------------------------------|:---------------------------|:-------------------------------------|:----------------------------|:-----------------------------------------|:----------------------------|:---------------------------|:----------------------|:----------------------------|
64+
| cilium | cilium | v1.16.0 | default | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
65+
| istio | istio | 1.22 | default | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |

site-src/implementations/v1.2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ Implementations only appear in this page if they pass Core conformance for the r
5555
| Organization | Project | Version | Mode | HTTPRouteBackendProtocolH2C | HTTPRouteBackendProtocolWebSocket | HTTPRouteBackendRequestHeaderModification | HTTPRouteBackendTimeout | HTTPRouteDestinationPortMatching | HTTPRouteHostRewrite | HTTPRouteMethodMatching | HTTPRoutePathRedirect | HTTPRoutePathRewrite | HTTPRoutePortRedirect | HTTPRouteQueryParamMatching | HTTPRouteRequestMirror | HTTPRouteRequestMultipleMirrors | HTTPRouteRequestTimeout | HTTPRouteResponseHeaderModification | HTTPRouteSchemeRedirect | MeshClusterIPMatching | HTTPRouteParentRefPort | MeshConsumerRoute |
5656
|:---------------|:----------|:--------------|:--------|:------------------------------|:------------------------------------|:--------------------------------------------|:--------------------------|:-----------------------------------|:-----------------------|:--------------------------|:------------------------|:-----------------------|:------------------------|:------------------------------|:-------------------------|:----------------------------------|:--------------------------|:--------------------------------------|:--------------------------|:------------------------|:-------------------------|:--------------------|
5757
| cilium | cilium | v1.17.0-pre.1 | default | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
58-
| istio | istio | 1.24 | default | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
58+
| istio | istio | 1.24 | default | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |

0 commit comments

Comments
 (0)