Skip to content

Commit d1ed316

Browse files
committed
Change titles on docs to show zap vs. spec
1 parent bb4ac53 commit d1ed316

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

docs/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ testing/index
2020
tools/index
2121
BUG_REPORT
2222
code_generation
23-
clusters
23+
zap_clusters
24+
spec_clusters
2425
ERROR_CODES
26+
2527
```
2628

2729
```{include} README.md

docs/cluster_ids.md docs/spec_clusters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Matter Cluster IDs
1+
# List of currently defined spec clusters
22
This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!
33

44
| ID (Decimal) | ID (hex) | Name |

docs/clusters.md docs/zap_clusters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Generally regenerate using one of:
88
- ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter
99
-->
1010

11-
## List of currently defined clusters
11+
## List of currently defined ZAP clusters
1212

1313
| Code (dec) | Code (hex) | Name |
1414
| ---------- | ---------- | ------------------------------------------------------- |

scripts/py_matter_idl/matter_idl/generators/markdown/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs):
2828
def internal_render_all(self):
2929
self.internal_render_one_output(
3030
template_path="clusters_markdown.jinja",
31-
output_file_name="clusters.md",
31+
output_file_name="zap_clusters.md",
3232
vars={
3333
'idl': self.idl,
3434
}

scripts/py_matter_idl/matter_idl/generators/markdown/clusters_markdown.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Generally regenerate using one of:
88
- ./scripts/codegen.py --output-dir docs --generator summary-markdown src/controller/data_model/controller-clusters.matter
99
-->
1010

11-
## List of currently defined clusters
11+
## List of currently defined ZAP clusters
1212

1313
| Code (dec) | Code (hex) | Name |
1414
| ---------- | ---------- | ------------------------------------------------------- |

scripts/spec_xml/generate_spec_xml.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
os.path.join(os.path.dirname(__file__), '..', '..'))
2828
DEFAULT_OUTPUT_DIR = os.path.abspath(
2929
os.path.join(DEFAULT_CHIP_ROOT, 'data_model'))
30-
DEFAULT_DOCUMENTATION_DIR = os.path.abspath(
31-
os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'cluster_ids.md'))
30+
DEFAULT_DOCUMENTATION_FILE = os.path.abspath(
31+
os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'spec_clusters.md'))
3232

3333

3434
def get_xml_path(filename, output_dir):
@@ -156,11 +156,12 @@ def dump_cluster_ids(output_dir):
156156
python_testing_path = os.path.abspath(
157157
os.path.join(DEFAULT_CHIP_ROOT, 'src', 'python_testing'))
158158
sys.path.insert(0, python_testing_path)
159-
clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters'))
159+
clusters_output_dir = os.path.abspath(
160+
os.path.join(output_dir, 'clusters'))
160161

161162
from spec_parsing_support import build_xml_clusters
162163

163-
header = '# Matter Cluster IDs\n'
164+
header = '# List of currently defined spec clusters\n'
164165
header += 'This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!\n\n'
165166

166167
clusters, problems = build_xml_clusters()
@@ -180,7 +181,7 @@ def dump_cluster_ids(output_dir):
180181
hex_id = f'0x{id:04X}'
181182
s += f'|{id:<{dec_len}}|{hex_id:<{hex_len}}|{cluster.name:<{name_len}}|\n'
182183

183-
with open(DEFAULT_DOCUMENTATION_DIR, 'w') as fout:
184+
with open(DEFAULT_DOCUMENTATION_FILE, 'w') as fout:
184185
fout.write(header)
185186
fout.write(s)
186187

0 commit comments

Comments
 (0)