Comments (9)
You're right, I completely missed that.
Would you mind creating a PR for that?
Here are the instructions of nbconvert
:
https://nbconvert.readthedocs.io/en/latest/install.html#installing-pandoc
Strangely, they don't mention the conda
channel conda-forge
, which has a package pandoc
.
Just for the record, once #36 is implemented, the pandoc
dependency will most likely be replaced by something else.
from nbsphinx.
Related to this, would you be open to an option allowing a doc build to continue, even if pandoc is not installed? We'd like to use nbsphinx as part of the pandas doc build, but don't want to require our contributors to install pandoc.
I don't know if it should follow the nbsphinx_allow_errors
option or not.
from nbsphinx.
@TomAugspurger The pandoc
dependency will vanish as soon as #36 is done, which I guess will not be soon at all.
Until that, pandoc
is used to convert every single Markdown cell, so I don't really see how this could be made optional.
What do you suggest should happen if pandoc
is not available?
Just skipping the Markdown cells wouldn't make sense, right?
from nbsphinx.
Hmm #36 does seem tricky...
What do you suggest should happen if pandoc is not available?
Just skipping the Markdown cells wouldn't make sense, right?
Right, I would think the entire notebook is skipped as soon as you hit a nbconvert.utils.pandoc.PandocMissing
.
For some more background, in pandas we currently have a single notebook as part of the doc build. That failing to build isn't the end of the world for a contributor just updating some other section of the docs. We can work around this as part of our build process if you think our use-case is too niche.
from nbsphinx.
OK, I see your use case now.
What about turning the PandocMissing
exception into a warning?
This would be quite simple, but how to tell Sphinx to discard the current source file and continue with the next?
While playing around with this, I found out that a change in nbconvert
release 5.0 (see jupyter/nbconvert#436) disabled my function markdown2rst()
!
I've tried to fix this in #101, can you please try if this works for you?
from nbsphinx.
@TomAugspurger I've asked in the Sphinx mailing list, got two work-arounds and came up with a third one, see https://groups.google.com/forum/#!topic/sphinx-users/lEJbtgv_uzk.
I think I could disable notebooks when pandoc
isn't found, the question is what should be done instead?
Should the resulting output pages just be empty (which means that they would also not appear in any table of contents because they don't have a title) or should they be replaced with some error page?
If latter, what should be displayed in a TOC instead of the title of the notebook?
from nbsphinx.
@mgeier thanks.
FWIW, I was able to work around this in pandas pretty easily here. I just check to see if nbconvert
can find a pandoc. In this case, we skip the notebook entirely, so it's skipped in the TOC (which is OK for us). It's probably easier for pandas to do it outside of the actual build processes, than for nbsphinx
to abort in the middle of converting a notebook.
I don't know what the desired behavior would be if we added something in nbsphinx. If these were behind a config setting, then I think a blank page or no page at all is OK, as long as it raises an exception by default.
from nbsphinx.
I've added #102 to deal with the original issue. Is it OK?
@TomAugspurger If you need something changed in nbsphinx
, just let me know!
I'm looking forward to many pandas
notebooks converted with nbsphinx
!
from nbsphinx.
#102 looks good!
I'm looking forward to it too :)
from nbsphinx.
Related Issues (20)
- Failure on multi-line maths with leading indentation
- Scroll long output HOT 1
- 0.9.2: documentation build fails HOT 1
- `DataFrame` with long column labels is not rendered correctly with the `pydata` theme HOT 1
- What's the best way to add support for sphinx directives in markdown cells? HOT 3
- xelatex support HOT 3
- How to link to a notebook from another file ? HOT 2
- WARNING: toctree glob pattern '*.ipynb' didn't match any documents HOT 1
- Math rending issue after converting the doc HOT 1
- nbsphinx PDF don't render Ploty Plot HOT 2
- Backslashes in markdown cells are sometimes incorrectly interpreted as inline TeX HOT 4
- Error on cells using tqdm
- Error on cells using progress bar (tqdm) HOT 8
- Avoid sphinx searching on output cells HOT 10
- Custom nbsphinx-gallery.css does not take into account - sphinx 7.2.6 HOT 8
- drop dependency to pandoc ? HOT 1
- AssertionError in `depart_codearea_latex()` HOT 4
- Conflict between sphinx.ext.autosectionlabel and nbsphinx HOT 2
- Matplotlib figures are not shown on the compiled documentation. HOT 7
- Default thumbnail asset not found HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbsphinx.