Skip to content

Commit af0eefc

Browse files
authored
Merge pull request #21 from SWIFTSIM/dont_show_empty_sections
Don't show empty sections (with no plots)
2 parents 3863920 + b754050 commit af0eefc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

swiftpipeline/html.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ def add_auto_plotter_metadata(self, auto_plotter_metadata: AutoPlotterMetadata):
175175
self.auto_plotter_metadata = auto_plotter_metadata
176176

177177
# Unique sections
178-
sections = {plot.section for plot in auto_plotter_metadata.metadata}
178+
sections = {
179+
plot.section
180+
for plot in auto_plotter_metadata.metadata
181+
if plot.show_on_webpage
182+
}
179183

180184
for section in sections:
181185
plots = [
@@ -219,7 +223,9 @@ def add_config_metadata(self, config: Config, is_comparison: bool = False):
219223
self.config = config
220224

221225
# Unique sections
222-
sections = {script.section for script in config.scripts}
226+
sections = {
227+
script.section for script in config.scripts if script.show_on_webpage
228+
}
223229

224230
scripts_to_use = config.comparison_scripts if is_comparison else config.scripts
225231

0 commit comments

Comments
 (0)