From 9f25fc6e478278673cb8ba2ab70156ef3528dbca Mon Sep 17 00:00:00 2001 From: Debian Science Maintainers Date: Sun, 1 Sep 2024 11:18:24 +0100 Subject: [PATCH] Don't fail documentation build on examples exceptions If example code outputs an error when run, ipython (ipython:: blocks) now fails the whole build by default, and tools/nbgenerate.py (.ipynb files) now leaves out that file (leaving a broken link in the examples index). As some examples use downloaded data and are hence expected to be unrunnable on a Debian buildd, this instead keeps them (::ipython with error output, .ipynb without output). Author: Rebecca N. Palmer Forwarded: not-needed Gbp-Pq: Name sphinx_ignore_errors.patch --- docs/Makefile | 2 ++ docs/source/conf.py | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/Makefile b/docs/Makefile index a77686d..48d35e4 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -34,6 +34,8 @@ html: mkdir -p $(BUILDDIR)/source/examples/notebooks/generated # Black list notebooks from doc build here $(TOOLSPATH)$(NOTEBOOKBUILD) --parallel --report-errors --skip-existing --execute-only --execution-blacklist statespace_custom_models + @echo "Copying notebooks that failed execution (there are usually several in Debian because some need network and/or dependencies we don't have)" + cp -nav ../examples/notebooks/*.ipynb -t source/examples/notebooks/generated || true @echo "Running sphinx-build" @echo @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O) diff --git a/docs/source/conf.py b/docs/source/conf.py index ead6eaf..345d3b8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -66,6 +66,7 @@ else: # nbsphinx options nbsphinx_allow_errors = True +ipython_warning_is_error = False # sphinxcontrib-spelling options spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt'] spelling_ignore_pypi_package_names = True -- 2.30.2