From efb7d556f8a9dbc8ae507730f6acbcf0d6477734 Mon Sep 17 00:00:00 2001 From: paugier Date: Thu, 18 Jan 2024 14:56:38 +0100 Subject: [PATCH] Doc: suppress meaningless warnings and turn warnings into errors --- .gitlab-ci.yml | 2 +- doc/Makefile | 2 +- doc/conf.py | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index feaa244cf..4d28d253a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -197,7 +197,7 @@ pages: - pip install fluidfft - pdm install -G doc -G fft -G test --no-self - pip install . --config-settings=setup-args=-Dtransonic-backend=python --no-deps - - pdm run xvfb-run --auto-servernum sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html + - pdm run xvfb-run --auto-servernum sphinx-build -W -b html -d doc/_build/doctrees doc doc/_build/html - mkdir -p public/$CI_COMMIT_REF_NAME - rsync -rvc --delete doc/_build/html/* public/$CI_COMMIT_REF_NAME/ # This directory can become too large leading to error. diff --git a/doc/Makefile b/doc/Makefile index ad505a0d3..411c2a7c6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -21,7 +21,7 @@ IPYTHON_NOTEBOOKS_DIR = $(IPYTHON_NOTEBOOKS:.ipynb=_files) .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + $(SPHINXBUILD) -W -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished.\nfile://"$(shell pwd)"/_build/html/index.html" diff --git a/doc/conf.py b/doc/conf.py index 54290455c..3d326a924 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -389,6 +389,10 @@ ] ) +nb_execution_raise_on_error = True +nb_execution_show_tb = True +nb_merge_streams = True + myst_enable_extensions = [ "amsmath", # "attrs_inline", @@ -403,3 +407,5 @@ "substitution", # "tasklist", ] + +suppress_warnings = ["mystnb.unknown_mime_type"]