From 5d2bcd87384c23a91f7f2b0ca06f2caa57517e10 Mon Sep 17 00:00:00 2001 From: Ruth Comer Date: Sun, 13 Nov 2022 14:07:22 +0000 Subject: [PATCH] Makefile html-noplot,clean: constrained layout tutorial image handling --- doc/Makefile | 1 + doc/conf.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 6316a5ca0407..9f5a5eb68d7a 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -24,6 +24,7 @@ clean: rm -rf "$(SOURCEDIR)/tutorials" rm -rf "$(SOURCEDIR)/savefig" rm -rf "$(SOURCEDIR)/sphinxext/__pycache__" + rm -f $(SOURCEDIR)/_static/constrained_layout*.png show: @python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/build/html/index.html')" diff --git a/doc/conf.py b/doc/conf.py index 4b9dfdaddb1f..74b935ebb77a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -208,8 +208,9 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf, def gallery_image_warning_filter(record): msg = record.msg - for gallery_dir in sphinx_gallery_conf['gallery_dirs']: - if msg.startswith(f'image file not readable: {gallery_dir}'): + for pattern in (sphinx_gallery_conf['gallery_dirs'] + + ['_static/constrained_layout']): + if msg.startswith(f'image file not readable: {pattern}'): return False if msg == 'Could not obtain image size. :scale: option is ignored.':