choldgraf / nbreport

27 stars 4 forks source link

Fixes 'hide_cell/code' #5

Closed votti closed 5 years ago

votti commented 5 years ago

This fixes the 'hide_cell' and 'hide_code' functionality (issue #4) by changing 'search_text=' to 'tag=' in the NotebookClearner call.

This was tested with nbclean==0.3.2

choldgraf commented 5 years ago

woot! thanks :-)

lwasser commented 5 years ago

i'm excited to test this out. I still have a dream of easy-to-implement reports for students.

choldgraf commented 5 years ago

@lwasser you should really check out voila...I think it'll get pretty close to what you'd like!

votti commented 5 years ago

Do you mean this voila: https://github.com/QuantStack/voila or another one?

What I am looking for is just a simple way to tag my cells to create different 'views' to export from a jupyter notebook as PDF. E.g. a version for my boss, just showing the key result plots and my text, a version for external collaborators showing even fewer plots, a version for my co-workers which still has all the plots and code, but is lacking some of my more explorative analysis that did not lead anywhere, but still might be useful to keep to re-use if it becomes relevant again.

Unfortunately I did not find something that does exactly that yet, but I would be grateful for any suggestions! 'Worst case' it looks quite straight forward to extend this repository and use it in combination with https://github.com/jupyterlab/jupyterlab-celltags

lwasser commented 5 years ago

@votti you and i are on the same mission :) in my case i like to create reports and to have students write data-driven blog posts too :)

@choldgraf that link led me to an odd place. is there a better link or is @votti 's link the right one. Thank you both!!

choldgraf commented 5 years ago

Yep, that Voila is the one - this should be the link: https://voila.readthedocs.io/en/latest/

@lwasser @votti I think that those use-cases are both really valuable - I actually opened up an issue about something similar here: https://github.com/QuantStack/voila/issues/171

(and I'm a big fan of the "cell metadata to control behavior" approach - it's what I use in Jupyter Book a lot (see comment in the issue I linked) and the jupyterlab-celltags plugin makes this super easy.

See also this issue where I explored their templating functionality. I think we could get pretty close to a proper "report" with this.