From de3c3e00f80584710c72984328e7835b3793132a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melissa=20Weber=20Mendon=C3=A7a?= Date: Fri, 1 Dec 2023 20:38:41 -0300 Subject: [PATCH] Add option to fail docs build on gallery example execution error (#256) # References and relevant issues Closes https://github.com/napari/napari/issues/6392 Depends on https://github.com/napari/docs/pull/255 # Description Added a sphinx gallery option to fail the docs build on example execution failure. Right now, this _should_ fail on CI due to one of our example failing, but the docs build will anyway depend on the #255. Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com> --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a14929e2c..12c21b039 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -254,7 +254,8 @@ def napari_scraper(block, block_vars, gallery_conf): 'plot_gallery': "'True'", # https://github.com/sphinx-gallery/sphinx-gallery/pull/304/files 'download_all_examples': False, 'min_reported_time': 10, - 'only_warn_on_example_error': True, + 'only_warn_on_example_error': False, + 'abort_on_example_error': True, 'image_scrapers': ("matplotlib", napari_scraper,), 'reset_modules': (reset_napari,), 'reference_url': {'napari': None},