3

My repo is located on github here: https://github.com/AshleySetter/optoanalysis

And the docs are in https://github.com/AshleySetter/optoanalysis/tree/master/optoanalysis/docs

ReadTheDocs doesn't fail but the produced documentation (hosted here: https://optoanalysis.readthedocs.io/en/latest/) doesn't display the doc strings that should be produced by the ..autodoc:: command.

However it runs fine locally and displays the documentation when I open the build/html/index.html file.

On ReadTheDocs it looks like:

READTHEDOCS documentation

Whereas the locally built html file looks like so:

locally hosted documentation

Why might this be?

phd
  • 82,685
  • 13
  • 120
  • 165
SomeRandomPhysicist
  • 1,531
  • 4
  • 19
  • 42

1 Answers1

2

You have modules written in Cython and compiled to C. I think ReadTheDocs doesn't support C extensions. You have to protect you imports to be generated at ReadTheDocs.

Something like this:

import os
if 'READTHEDOCS' not in os.environ:
    import cython_generated_ext
phd
  • 82,685
  • 13
  • 120
  • 165