Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIDDEN stopped hiding code cells #111

Closed
davidwagner opened this issue Jul 12, 2019 · 7 comments
Closed

HIDDEN stopped hiding code cells #111

davidwagner opened this issue Jul 12, 2019 · 7 comments

Comments

@davidwagner
Copy link
Member

Putting # HIDDEN at the top of a code cell used to cause the code to be hidden (excluded from the generated output). That no longer works.

To reproduce: run make site; make serve and look at http://127.0.0.1:4000/chapters/01/3/1/Literary_Characters.html; it shows two code cells at the top of the page that contain # HIDDEN.

@davidwagner
Copy link
Member Author

@choldgraf, do you have any ideas about how to troubleshoot this?

(Could it be related to jupyter-book/jupyter-book#162 and jupyter-book/jupyter-book#207? I didn't fully process their implications.)

@davidwagner
Copy link
Member Author

_config.yml looks reasonable:

hide_cell_text: '# HIDE CODE AND OUTPUT' # When building the textbook, any cells with this text inside will be hidden in the output markdown
hide_code_text: '# HIDDEN'               # When building the textbook, any cells with this text inside will have *only* their output shown (no code)

I looked through recent changes to nbclean and didn't see anything there that seemed like it would create problems.

@choldgraf
Copy link
Contributor

Hey @davidwagner - good catch. Jupyter Book now has people hide cells via notebook cell tags rather than via comments in the cell itself. Here are some instructions on Jupyter Book:

https://jupyter.org/jupyter-book/features/hiding.html

cell tags are built in to the classic notebook interface already (I think it's under View somewhere) and this extension is useful for handling tags in jupyter lab.

does that help?

@davidwagner
Copy link
Member Author

@choldgraf, Oh, I see. Thanks for the explanation. Unfortunately I can no longer build the textbook, due to this change to Jupyter Book. We have 143 instances of # HIDDEN in the Data 8 textbook and converting all of those by hand to the new method sounds painful. Can you suggest any tool I could use to automate the conversion? Or is there any way to enable backwards compatibility support for the old comments method?

@choldgraf
Copy link
Contributor

I thought we had converted those a while back but I guess not, so I’ll do the conversion this week. Sounds good?

@davidwagner
Copy link
Member Author

@choldgraf , oh, that'd be awesome, thank you!

@davidwagner
Copy link
Member Author

Awesome, thank you so much for all the fixes, @choldgraf ! I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants