From cc9939ea87393cc5b5036fa786d6a9b385971d06 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 18 Oct 2024 02:41:26 +0200 Subject: flatten index --- metchart/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'metchart') diff --git a/metchart/manager.py b/metchart/manager.py index a7e3eaa..36cfaa9 100644 --- a/metchart/manager.py +++ b/metchart/manager.py @@ -29,7 +29,8 @@ class Manager: index = ThreadPool(self._thread_count).map(lambda p: p['module'].run(**p['cfg']), self._plotters) with open(os.path.join(self._output_dir, 'index.json'), 'w') as f: - f.write(json.dumps(index, indent=4)) + # NOTE index needs to be flattened. + f.write(json.dumps([x for xs in index for x in xs], indent=4)) def _load(self): with open(self._filename, 'r') as f: -- cgit v1.2.3