You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
measurement Info shoudl have a _reprt_html method to be printed in a notebook #6846
That's great! I think if the html is returned by _repr_html_ it should work properly.
Incidentally you can show this off in our doc build by modifying some example that talks about meas info, and just having a line at the end of some code block like:
#############################################
# We can also get a nice HTML representation in IPython like:
info
Sphinx-gallery will recognize this statement-without-assignment and, if the object has a _repr_html_, add it to the output of the code block...
yes I would add _repr_html_ methods and then make sure that report.py just reuses these so we shoot 3 birds with one stone. It will work for the notebook, the doc and the Report
Reacted by Richard Höchenberger and Valerii Chirkov
Activity
larsoner commentedon Sep 30, 2019
I would wait to work on this until we can use sphinx-gallery/sphinx-gallery#540 to see the outputs
agramfort commentedon Sep 30, 2019
larsoner commentedon Aug 31, 2020
Anybody want a fun quick one for 0.21? @hoechenberger maybe?
hoechenberger commentedon Sep 1, 2020
Maybe I can squeeze it in somewhere, but no promises :)
vagechirkov commentedon Mar 18, 2021
@hoechenberger @agramfort is it something that you expect in the
_repr_htmlmethod?agramfort commentedon Mar 18, 2021
vagechirkov commentedon Mar 18, 2021
The design is random :)
hoechenberger commentedon Mar 18, 2021
I'm wondering if we could "cast" the Info into a pandas DataFrame and simply use the DataFrame's HTML representation method?
agramfort commentedon Mar 18, 2021
hoechenberger commentedon Mar 18, 2021
Ok. Then, how about repurposing what we already have in
Report?mne-python/mne/report.py
Lines 819 to 874 in fc3f2b5
agramfort commentedon Mar 18, 2021
vagechirkov commentedon Mar 18, 2021
Here is an example of
raw_templateoutput usingIPython.display.HTMLlarsoner commentedon Mar 18, 2021
That's great! I think if the
htmlis returned by_repr_html_it should work properly.Incidentally you can show this off in our doc build by modifying some example that talks about meas info, and just having a line at the end of some code block like:
Sphinx-gallery will recognize this statement-without-assignment and, if the object has a
_repr_html_, add it to the output of the code block...agramfort commentedon Mar 18, 2021
yes I would add
_repr_html_methods and then make sure that report.py just reuses these so we shoot 3 birds with one stone. It will work for the notebook, the doc and the Reportvagechirkov commentedon Mar 19, 2021
Here is am output of rendering
plot_report.pytutorial:drammock commentedon Jun 15, 2022
this was done in #9161