XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
100 stars 55 forks source link

[Thewalrus documentation] The figures in "Basics of Hafnians and Loop Hafnians" are missing #247

Closed sylviemonet closed 2 years ago

sylviemonet commented 3 years ago

Issue description

The figures in the documentation "Basics of Hafnians and Loop Hafnians" are not found.

截屏2021-06-02 下午1 42 30

Additional information

https://the-walrus.readthedocs.io/en/latest/gallery/basics.html

josh146 commented 3 years ago

Nice catch @sylviemonet. It looks like the entire CSS of the jupyter notebooks is broken 🤔

Perhaps one fix is to update the version of nbsphinx we are using?

co9olguy commented 3 years ago

@josh146 does this just apply to the thewalrus or could it be the same in other libraries using nbspinx?

nquesada commented 3 years ago

@co9olguy : I do not know the answer to you question, but as far as I remember the only place where we used notebooks and do not create them from python scripts is here. As far as I've seen in e.g. the photonics website all the images are there.

josh146 commented 3 years ago

Yep, currently the walrus is the only repo of ours that uses nbsphinx.

In the doc/requirements.txt file, we have

docutils==0.16
sphinx==1.8.5
nbsphinx

That is, Sphinx and docutils is pinned, but nbsphinx isn't. So likely a new version of nbsphinx was released that doesn't work with the old version of Sphinx/docutils.

The fix should be as simply as downgrading nbsphinx to an older version that uses the same CSS rules; from looking at recent releases, perhaps trying version 0.7?

Alternately, we could upgrade the version of Sphinx we are using, but that is more dicey, and likely to break other parts of the documentation.

co9olguy commented 3 years ago

Any updates on this issue? Looks like there was a simple fix we could try. Does it solve the problem?

nquesada commented 3 years ago

I've tried implementing @josh146 fix in this PR: https://github.com/XanaduAI/thewalrus/pull/260 . The docs unfortunately don't build :(

nquesada commented 3 years ago

One funny (not sure if relevant) thing is that it seems as if python 3.6 is being used to build docs when nbsphinx is set 0.7.