Skip to content

Commit 2abf3d1

Browse files
committed
Fix dendrogram names
Separates legacy behavior (YAML files) and modern behavior (TOML files). When using TOML files, the output name is updated to reflect the subset of platforms that were actually included in the analysis. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent a09cbe6 commit 2abf3d1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

bin/codebasin

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,17 @@ def main():
306306

307307
# Print clustering report
308308
if report_enabled("clustering"):
309-
if config_file is None:
310-
platform_names = [p[0] for p in args.platforms]
311-
output_prefix = "-".join(platform_names)
312-
else:
309+
# Legacy behavior: guess prefix from YAML filename
310+
if config_file is not None:
313311
output_prefix = os.path.realpath(guess_project_name(config_file))
312+
313+
# Modern behavior: append platforms to TOML filename
314+
else:
315+
basename = os.path.basename(args.analysis_file)
316+
filename = os.path.splitext(basename)[0]
317+
platform_names = [p for p in codebase["platforms"]]
318+
output_prefix = "-".join([filename] + platform_names)
319+
314320
clustering_output_name = output_prefix + "-dendrogram.png"
315321
clustering = report.clustering(clustering_output_name, setmap)
316322
if clustering is not None:

0 commit comments

Comments
 (0)