27
27
os .path .join (os .path .dirname (__file__ ), '..' , '..' ))
28
28
DEFAULT_OUTPUT_DIR = os .path .abspath (
29
29
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' ))
32
32
33
33
34
34
def get_xml_path (filename , output_dir ):
@@ -156,11 +156,12 @@ def dump_cluster_ids(output_dir):
156
156
python_testing_path = os .path .abspath (
157
157
os .path .join (DEFAULT_CHIP_ROOT , 'src' , 'python_testing' ))
158
158
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' ))
160
161
161
162
from spec_parsing_support import build_xml_clusters
162
163
163
- header = '# Matter Cluster IDs \n '
164
+ header = '# List of currently defined spec clusters \n '
164
165
header += 'This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!\n \n '
165
166
166
167
clusters , problems = build_xml_clusters ()
@@ -180,7 +181,7 @@ def dump_cluster_ids(output_dir):
180
181
hex_id = f'0x{ id :04X} '
181
182
s += f'|{ id :<{dec_len }} |{ hex_id :<{hex_len }} |{ cluster .name :<{name_len }} |\n '
182
183
183
- with open (DEFAULT_DOCUMENTATION_DIR , 'w' ) as fout :
184
+ with open (DEFAULT_DOCUMENTATION_FILE , 'w' ) as fout :
184
185
fout .write (header )
185
186
fout .write (s )
186
187
0 commit comments