Leave a dotted key out of the runs export header

_leaves named a column for a key like `-1.0` that _dig can never read
back, so the export showed an always-empty column. Skip such a key.
This commit is contained in:
2026-09-16 16:43:52 +02:00
parent d4f0345e97
commit 02907bbe27
3 changed files with 13 additions and 1 deletions
+6
View File
@@ -441,9 +441,15 @@ def _leaves(value: Any, prefix: str = "") -> Iterator[tuple[str, Any]]:
the numbers arrive inside `final_metrics` — and a record in one cell is
not a column anybody can compare. Lists are left whole: a curve belongs in
the long table, not in a cell of this one.
A key with a dot in its own name — a frequency written `-1.0` — is left
out, and whatever sits under it with it: `_dig` cannot read such a path
back, so naming it would promise a column that is always empty.
"""
if isinstance(value, dict):
for key, inner in value.items():
if "." in str(key):
continue
yield from _leaves(inner, f"{prefix}.{key}" if prefix else str(key))
else:
yield prefix, value