getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.05k stars 64 forks source link

doc building failed with target html-noplot due to missing matplotlib package #162

Closed gdurif closed 3 years ago

gdurif commented 3 years ago

make html-noplot in doc folder failed (despite installing requirements):

copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 582 warnings.

The HTML pages are in _build/html.
Sphinx-Gallery gallery_conf["plot_gallery"] was False, so no examples were executed.
embedding documentation hyperlinks...
embedding documentation hyperlinks for _auto_tutorials... [100%] plot_RBF_interpolation_numpy.html                                                                          
embedding documentation hyperlinks for _auto_benchmarks... [100%] plot_benchmark_invkernel.html                                                                             
embedding documentation hyperlinks for ./_auto_examples... [ 85%] plot_kernel_product_syntax.html                                                                           
Traceback (most recent call last):
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx/events.py", line 111, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx_gallery/docs_resolv.py", line 443, in embed_code_links
    _embed_code_links(app, gallery_conf, gallery_dir)
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx_gallery/docs_resolv.py", line 346, in _embed_code_links
    for modname in (cobj['module_short'], cobj['module']):
TypeError: string indices must be integers

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx/application.py", line 389, in build
    self.events.emit('build-finished', None)
  File "/home/drg/work/code/project/keops/.pyenv/lib/python3.6/site-packages/sphinx/events.py", line 120, in emit
    (listener.handler, name), exc, modname=modname) from exc
sphinx.errors.ExtensionError: Handler <function embed_code_links at 0x7f3082abfa60> for event 'build-finished' threw an exception (exception: string indices must be integers)

Extension error (sphinx_gallery.docs_resolv):
Handler <function embed_code_links at 0x7f3082abfa60> for event 'build-finished' threw an exception (exception: string indices must be integers)
Makefile:63: recipe for target 'html-noplot' failed
make: *** [html-noplot] Error 2

Moreover, it required matplotlib as a dependencies which is not in doc/requirements.txt.

gdurif commented 3 years ago

make html-noplot finally worked in a clean environment.

ToDo

gdurif commented 3 years ago

Fixed in PR #163