Skip to content

new repr_html makes tutorials too long #9249

@drammock

Description

@drammock

The new _repr_html for Info, Raw, Epochs, and Evoked is pretty cool. But it has a drawback, which is that every time an instance is returned at the end of a tutorial cell, we get the full HTML repr (13 lines for a Raw). In some tutorials this happens multiple times, the extra information isn't always helpful, and it breaks up the flow of the lesson. For example, in this tutorial the HTML repr of Raw happens twice, once after a call of raw.crop(tmax=60).load_data() and once after raw.set_annotations(). The first occurence is maybe arguably useful (though not directly relevant to the tutorial's purpose) but IMO the second one is clearly not helpful. I scanned through the first ~15-20 tutorials and found that about 1/3 of them have 2 instances of a Raw HTML repr; I didn't check closely but I'd guess that many of them are extraneous / unneeded.

Possible solutions:

  1. live with it
  2. go around putting _ = before all the cases where we want to suppress the HTML output
  3. is there a way to only show the nice table when the object is explicitly printed?

WDYT @vagechirkov @hoechenberger et al?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions