From c44c43ac7470c71607cd5d3bd312883b2296f487 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 15 May 2025 19:09:09 -0500 Subject: [PATCH] scripts: Renamed *d3.py -> *svg.py - codemapd3.py -> codemapsvg.py - dbgbmapd3.py -> dbgbmapsvg.py - treemapd3.py -> treemapsvg.py Originally these were named this way to match plotmpl.py, but these names were misleading. These scripts don't actually use the d3 library, they're just piles of Python, SVG, and Javascript, modelled after the excellent d3 treemap examples. Keeping the *d3.py names around also felt a bit unfair to brendangregg's flamegraph SVGs, which were the inspiration for the interactive component. With d3 you would normally expect a rich HTML page, which is how you even include the d3 library. plotmpl.py is also an outlier in that it supports both .svg and .png output. So having a different naming convention in this case makes sense to me. So, renaming *d3.py -> *svg.py. The inspiration from d3 is still mentioned in the top-level comments in the relevant files. --- Makefile | 4 ++-- scripts/{codemapd3.py => codemapsvg.py} | 2 +- scripts/{dbgbmapd3.py => dbgbmapsvg.py} | 2 +- scripts/{treemapd3.py => treemapsvg.py} | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename scripts/{codemapd3.py => codemapsvg.py} (99%) rename scripts/{dbgbmapd3.py => dbgbmapsvg.py} (99%) rename scripts/{treemapd3.py => treemapsvg.py} (99%) diff --git a/Makefile b/Makefile index 7095bbea..2100293c 100644 --- a/Makefile +++ b/Makefile @@ -610,11 +610,11 @@ $(BUILDDIR)/lfs.perfbd.csv: $(BENCH_TRACE) $(PERFBDFLAGS) -o$@) $(BUILDDIR)/lfs.codemap.svg: $(OBJ) $(CI) - $(strip ./scripts/codemapd3.py $^ $(CODEMAPFLAGS) -o$@ \ + $(strip ./scripts/codemapsvg.py $^ $(CODEMAPFLAGS) -o$@ \ && ./scripts/codemap.py $^ --no-header) $(BUILDDIR)/lfs.codemap-tiny.svg: $(OBJ) $(CI) - $(strip ./scripts/codemapd3.py $^ --tiny $(CODEMAPFLAGS) -o$@ \ + $(strip ./scripts/codemapsvg.py $^ --tiny $(CODEMAPFLAGS) -o$@ \ && ./scripts/codemap.py $^ --no-header) $(BUILDDIR)/lfs.test.csv: $(TEST_CSV) diff --git a/scripts/codemapd3.py b/scripts/codemapsvg.py similarity index 99% rename from scripts/codemapd3.py rename to scripts/codemapsvg.py index ed976dc9..d61cf9d7 100755 --- a/scripts/codemapd3.py +++ b/scripts/codemapsvg.py @@ -2119,7 +2119,7 @@ if __name__ == "__main__": import argparse import sys parser = argparse.ArgumentParser( - description="Render code info as an interactive d3-esque treemap.", + description="Render code info as an interactive SVG treemap.", allow_abbrev=False) class AppendPath(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/dbgbmapd3.py b/scripts/dbgbmapsvg.py similarity index 99% rename from scripts/dbgbmapd3.py rename to scripts/dbgbmapsvg.py index 5f6273d2..d6b9a68a 100755 --- a/scripts/dbgbmapd3.py +++ b/scripts/dbgbmapsvg.py @@ -5248,7 +5248,7 @@ if __name__ == "__main__": import sys parser = argparse.ArgumentParser( description="Render currently used blocks in a littlefs image " - "as an interactive d3-esque map.", + "as an interactive SVG block map.", allow_abbrev=False) parser.add_argument( 'disk', diff --git a/scripts/treemapd3.py b/scripts/treemapsvg.py similarity index 99% rename from scripts/treemapd3.py rename to scripts/treemapsvg.py index 6f737236..1f3b8e0c 100755 --- a/scripts/treemapd3.py +++ b/scripts/treemapsvg.py @@ -1015,7 +1015,7 @@ if __name__ == "__main__": import argparse import sys parser = argparse.ArgumentParser( - description="Render CSV files as a d3-esque treemap.", + description="Render CSV files as an SVG treemap.", allow_abbrev=False) parser.add_argument( 'csv_paths',