BCDA-APS / bluesky_training

Bluesky training, including instrument package
https://bcda-aps.github.io/bluesky_training/
Other
11 stars 0 forks source link

DOC Hello world notebook has extra cells in documentation #129

Closed rodolakis closed 10 months ago

rodolakis commented 1 year ago

image

prjemian commented 1 year ago

Seems to be a common problem for all notebooks.

prjemian commented 10 months ago

I can replicate this behavior in a local build.

prjemian commented 10 months ago

In the editor: image

After rebuilding the docs, here's the view in the browser: image

prjemian commented 10 months ago

Which uses this HTML code:

<p>What about extra cells?</p>
<div class="nbinput docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Hello&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="nboutput nblast docutils container">
<div class="prompt empty docutils container">
</div>
<div class="output_area docutils container">
<div class="highlight"><pre>
Hello
</pre></div></div>
</div>
prjemian commented 10 months ago

This div block is responsible: nbinput docutils container

nbsphinx

prjemian commented 10 months ago

Apparently, the order of listing the Sphinx extensions is important. Problem goes away when this one is moved to the end of the list: https://github.com/BCDA-APS/bluesky_training/blob/9bc5b9e83bddbb46fbc4af02bc82767afaf08c4f/docs/source/conf.py#L27

prjemian commented 10 months ago

image