Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Makefile html-noplot,clean: constrained layout tutorial image handling #24445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand Down
5 changes: 3 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.':
Expand Down