From b75405083760db610e63c1d7736173ac92480821 Mon Sep 17 00:00:00 2001 From: Evgenii Chaikin Date: Thu, 25 Mar 2021 14:52:15 +0100 Subject: [PATCH] Don't show empty sections --- swiftpipeline/html.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/swiftpipeline/html.py b/swiftpipeline/html.py index ce7e5bd..c8c2895 100644 --- a/swiftpipeline/html.py +++ b/swiftpipeline/html.py @@ -175,7 +175,11 @@ def add_auto_plotter_metadata(self, auto_plotter_metadata: AutoPlotterMetadata): self.auto_plotter_metadata = auto_plotter_metadata # Unique sections - sections = {plot.section for plot in auto_plotter_metadata.metadata} + sections = { + plot.section + for plot in auto_plotter_metadata.metadata + if plot.show_on_webpage + } for section in sections: plots = [ @@ -219,7 +223,9 @@ def add_config_metadata(self, config: Config, is_comparison: bool = False): self.config = config # Unique sections - sections = {script.section for script in config.scripts} + sections = { + script.section for script in config.scripts if script.show_on_webpage + } scripts_to_use = config.comparison_scripts if is_comparison else config.scripts