Closed effigies closed 5 years ago
you are absolutely right. This should be fixed by https://github.com/Chilipp/sphinx-nbexamples/pull/9. I allow disable_warnings
to be True
for python notebooks only.
Hey @effigies! Thanks again for all your inputs. This is just to inform you that I made a new release with your fixes (and some more)
https://github.com/Chilipp/sphinx-nbexamples/releases/tag/v0.4.0
It is already available on PyPi and conda-forge will come soon.
If there is anything else: I am looking forward to new issues and PRs 😉
Awesome! Thanks! I'll probably open more issues as I write more notebooks, but things are looking good on my end for now. Thanks a ton for such a useful package!
You're very welcomed :smile:
Similar to #4, there is another Python assumption baked in, which is that if
disable_warnings is True
, then all code cells, whether they are Python or not, have Python code inserted prior to them and run with their kernel:https://github.com/Chilipp/sphinx-nbexamples/blob/3a87e26ab621362e88b6ea9ba44f82f0b77374f7/sphinx_nbexamples/__init__.py#L340-L346
My solution at present is to set
disable_warnings=False
, which is fine for a collection of notebooks that don't use Python at all, but if I did have a Python notebook or a SOS notebook with a Python cell, then it would be nice to check the kernel of the cell/notebook before inserting this code.I might have a go at this in the next couple weeks, but I don't have much experience with these tools, so it might be obvious and trivial to you.