Motivation
HERD inherits the generic Container._repr_html_ (src/hdmf/container.py), which renders its six child tables (keys, files, entities, entity_keys, objects, object_keys) as nested collapsible sections. For a HERD read back from a file, these collapsibles can appear empty at first glance, which is confusing: the data is present and accessible via to_dataframe() and the individual tables, but the default display does not surface it.
This is a real, documented usability problem. The PyNWB HERD tutorial currently has to warn users about it:
"In a Jupyter notebook, the default display of a read HERD shows collapsible sections that can appear empty. To see the annotations, use ... to_dataframe() ... or the individual tables."
(see the tutorial in NeurodataWithoutBorders/pynwb#2200)
Proposal
Give HERD a custom __repr__ and _repr_html_ that surface the actual annotations, e.g. the flattened to_dataframe() view (one row per (object, key, entity) association), or a concise summary plus the flattened table. This removes the "appears empty" confusion and makes the contents discoverable without the user needing to know which accessor to call.
Display only; no change to stored data or the table APIs.
Context
Code of Conduct
Motivation
HERD inherits the generic
Container._repr_html_(src/hdmf/container.py), which renders its six child tables (keys,files,entities,entity_keys,objects,object_keys) as nested collapsible sections. For a HERD read back from a file, these collapsibles can appear empty at first glance, which is confusing: the data is present and accessible viato_dataframe()and the individual tables, but the default display does not surface it.This is a real, documented usability problem. The PyNWB HERD tutorial currently has to warn users about it:
(see the tutorial in NeurodataWithoutBorders/pynwb#2200)
Proposal
Give
HERDa custom__repr__and_repr_html_that surface the actual annotations, e.g. the flattenedto_dataframe()view (one row per (object, key, entity) association), or a concise summary plus the flattened table. This removes the "appears empty" confusion and makes the contents discoverable without the user needing to know which accessor to call.Display only; no change to stored data or the table APIs.
Context
Code of Conduct