qutip / qutip-doc

QuTiP documentation
36 stars 58 forks source link

Remove matplotlib.sphinxext.only_directives #66

Closed quantshah closed 3 years ago

quantshah commented 5 years ago

Matplotlib removed the sphinx directives and they are a part of Ipython now. See issue. So anyone on the latest Sphinx will face an error when trying to build the documentation.

This was also faced in #62. I have a version of the docs built from scratch with the latest sphinx which should fix this. Just thinking of the best way to deal with figures and output without using IPython at all as it leads to other issues.

Running Sphinx v1.8.4

Extension error:
Could not import extension matplotlib.sphinxext.only_directives (exception: No module named 'matplotlib.sphinxext.only_directives')
make: *** [html] Error 2
joseraulgonzalez commented 5 years ago

What did you modify in your version of the docs to make the process work with Python 3.7.x and the latest version of sphinx?

quantshah commented 5 years ago

Hi, @joseraulgonzalez , I made a PR which should run with the following configurations: https://github.com/qutip/qutip-doc/pull/84

I still need to fix a couple of things about replacing the ipython directive with some kind of sphinx directive that runs the examples and renders plots. But this should get you working.

If you want to checkout the PR locally and build things then you can do so using:

git fetch https://github.com/qutip/qutip-doc.git pull/84/head:update_sphinx
git checkout update_sphinx

Then you can do the usual

make clean
make html
jakelishman commented 3 years ago

Fixed in #81