Skip to content

Commit 623574e

Browse files
committed
Have 3 columns for the quick_look_plots.html - the last one being either biolume or planktivore.
1 parent 82be5bf commit 623574e

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎src/data/lrauv_deployment_plots.py‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ def _update_index_html(
429429

430430
def _col_index(href: str) -> int:
431431
return next(
432-
(i for i, k in enumerate(self._PLOT_COLUMN_ORDER) if k in href),
433-
len(self._PLOT_COLUMN_ORDER),
432+
(col for key, col in self._PLOT_COLUMN_ORDER if key in href),
433+
max(col for _, col in self._PLOT_COLUMN_ORDER) + 1,
434434
)
435435

436436
max_cols = (
@@ -1005,12 +1005,13 @@ def _write_per_png_html( # noqa: C901, PLR0913
10051005
"2column_planktivore",
10061006
"2column_engineering",
10071007
)
1008-
# Column order in quick_look_plots.html: cmocean=0, engineering=1, biolume/planktivore=2
1008+
# (kind_substring, column_index) — biolume and planktivore are mutually exclusive
1009+
# so they share column 2, keeping the table at 3 columns maximum.
10091010
_PLOT_COLUMN_ORDER = (
1010-
"2column_cmocean",
1011-
"2column_engineering",
1012-
"2column_biolume",
1013-
"2column_planktivore",
1011+
("2column_cmocean", 0),
1012+
("2column_engineering", 1),
1013+
("2column_biolume", 2),
1014+
("2column_planktivore", 2),
10141015
)
10151016
_PLOT_KIND_LABELS = {
10161017
"2column_cmocean": "Standard",

0 commit comments

Comments
 (0)