3

I'm trying to get Read the Docs to generate the py-modindex.html file. Research into this question lead me to the following setup:

  • setup.py in the project directory has the following contents, which were the minimum needed to get pytest to work and haven't been changed since I got that part of my project working:

    import setuptools
    
    setuptools.setup(
        name='polygons',
        packages=setuptools.find_packages(),
    )
    
  • docs/requirements.txt contains a single line:

    sphinx-autodoc-annotation
    
  • The Read the Docs repository URL points to my GitHub repository.

  • The RtD setting for "Install your project inside a virtualenv using setup.py install" is checked.
  • The RtD setting for "Requirements file" points to docs/requirements.txt.

The "Module Index" link gets included in index.html, but the py-modindex.html file is missing.

My understanding is that with the virtualenv setting above, RtD will use the setup.py file to install the project so that Sphinx can read the documentation found in the Python docstrings. I'm using function annotations and would like sphyinx-autodoc-annotation to make use of those when creating the built docs files. All of this works splendidly on my local machine when I run make html while in the docs folder. Now I'm trying to get it to work on Read the Docs.

Note: This is an exercise I'm going through to understand everything before I apply it to my real project, which the polygons project is a placeholder for.

Community
  • 1
  • 1
Chuck
  • 4,662
  • 2
  • 33
  • 55

0 Answers0