jupyter-book / jupyter-book

Create beautiful, publication-quality books and documents from computational content.
http://jupyterbook.org
BSD 3-Clause "New" or "Revised" License
3.82k stars 654 forks source link

ipynb files displaying in book without formatting #1896

Open joemcglinchy opened 1 year ago

joemcglinchy commented 1 year ago

Describe the bug

context When I commit changes with an ipynb, I want the output and formatting preserved. I have tried setting execute to off, auto, and force, but force is not ideal because i have credentials being used which are being loaded to run the notebook but I don't want to publish access to them in the repository.

expectation I expected the published version to have formatting like I see when running the notebook locally... bold font for keywords like for, lambda, etc.

bug But instead it is rendered as plain text (Raw NBConvert?)

this could be a rendering issue

**problem**
This is an issue mainly in aesthetics. 

### Reproduce the bug

1. go to https://hydrosat.github.io/fusion-hub-docs/examples/order-service-example.html
2. see the text rendered as plain text, not python formatted

### List your environment

'''
jupyter-book --version
Jupyter Book      : 0.12.2
External ToC      : 0.2.3
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.1
Sphinx Book Theme : 0.1.10
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.11
welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

joemcglinchy commented 1 year ago

i will add that a local build has the rendering of the text I'd expect in the html.

local: image

github-actions build: image

joemcglinchy commented 1 year ago

i'd like to bump this and ask now, is there a good way to clean out the gh-pages branch?

Zethson commented 1 year ago

I was told that it's an issue with ipython 8.7.0 but I haven't figured out why yet.

Zethson commented 1 year ago

https://github.com/spatialaudio/nbsphinx/issues/687

see this issue

choldgraf commented 1 year ago

This is because of this bug:

It has been fixed and merged, but not yet released. We can close this issue once it is released. In the meantime, I recommend pinning IPython to avoid the latest version.

joemcglinchy commented 1 year ago

I pinned ipython!=8.7.0 and we are back in business! thank you so much. I had it pinned to a 7.x version before, but the formatting is looking good again.

Zethson commented 1 year ago

@choldgraf ipython 8.8.0 got released