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

Feature request: hide execution count #671

Closed
adamjstewart opened this issue Sep 7, 2022 · 5 comments
Closed

Feature request: hide execution count #671

adamjstewart opened this issue Sep 7, 2022 · 5 comments

Comments

@adamjstewart
Copy link

When rendering notebooks, nbsphinx includes the execution_count of each cell like so:
Screen Shot 2022-09-07 at 1 25 20 PM
Here, the execution_count of the first cell is null, while the second is 6. These execution counts are useful in Jupyter Notebook as they allow you to see the history of which cells you ran in which order. However, they aren't particularly useful in documentation where you just want to document a feature, present some code, and display the output. Can we add a feature that allows users to optionally hide the execution count of each cell during rendering?

@mgeier
Copy link
Member

mgeier commented Sep 16, 2022

You should hide the execution count via CSS, see https://nbsphinx.readthedocs.io/en/0.8.9/custom-css.html#For-a-Single-Notebook.


But what I'm more concerned about is the unintended line break in your first code cell.
Which Sphinx theme are you using and which browser?
I think I might have to add some CSS to avoid line breaks there.

@adamjstewart
Copy link
Author

Theme is the master branch of https://github.com/pytorch/pytorch_sphinx_theme, browser is Chrome.

@mgeier
Copy link
Member

mgeier commented Sep 17, 2022

Thanks @adamjstewart, this seems to happen only on master, not on the latest release.

Either way, I think #675 should fix this.


Did you manage to remove your prompts?


BTW, the PyTorch theme is quite bad, most notably because of blown up images (which you have already reported in pytorch/pytorch_sphinx_theme#140) leading to work-arounds like https://github.com/microsoft/torchgeo/blob/main/docs/_static/workaround.css. But there are many more minor ugly things going on.

@adamjstewart
Copy link
Author

this seems to happen only on master, not on the latest release.

This is also present in our docs for TorchGeo 0.1.1, which was released in December 2021, so the bug has existed for at least that long.

Did you manage to remove your prompts?

Worked like a charm! microsoft/torchgeo#783

BTW, the PyTorch theme is quite bad

Yeah... I wish it was better maintained. There seems to be a fork that is actually maintained, may move to that someday. Trying to stick to the same theme as the rest of the PyTorch ecosystem if possible. I'm aware of many more bugs (microsoft/torchgeo#101) but don't have the expertise to fix them myself.

@mgeier
Copy link
Member

mgeier commented Sep 24, 2022

I'm closing this as resolved, because prompts should be removed via CSS.

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