gitpython-developers / GitPython

GitPython is a python library used to interact with Git repositories.

Home Page:http://gitpython.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Reference not populated in online docs

EliahKagan opened this issue · comments

In the Read the Docs deployment, the API Reference page is unpopulated: the sections exist, but they do not contain any entries from the classes, functions, etc., that are supposed to go there.

This only affects the online documentation. Building the documentation locally still works with make -C doc html, provided the necessary dependencies are installed, and the API Reference page is fully populated. (This is how I have usually verified tricky or substantial changes to the documentation, and I was able to do it with no problems to check #1839.)

Furthermore, it only affects documentation from after #1794 was fixed. For a while before it was fixed, no new documentation was deployed online. But the API Reference page worked before that, and still works when accessed on readthedocs.org for those old versions.

It seems the changes made in 634151a to fix #1794 were sufficient to get documentation to build again, but not sufficient to set up Read the Docs in such a way that it would be able to populate members for code like:

.. automodule:: git.cmd
:members:
:undoc-members:
:special-members:

I don't know why this is or how best to investigate it, and I am not experienced with Read the Docs. But a couple of possibilities occur to me, both based in part on my observation that, when I build the documentation locally, the generated documentation shows values for attributes that are populated from environment variables, where the value I set for the environment variable is the value shown in the documentation. In other words, building the documentation relies on being able to import the modules and makes use of state set from running their top-level code.

If Read the Docs is itself (re)building the documentation--which if I understand correctly is what the new .readthedocs.yaml configures--then perhaps it is unable to successfully import those modules:

  1. Does it have the necessary Python dependencies?
  2. Does the container that builds the documentation have a git command?

I reiterate that Read the Docs deployment is not an area where I am currently knowledgeable.

Thanks for bringing this to my attention, I wasn't aware.

I wanted to share some build logs that seem to be publicly accessible for further examination:

It keeps saying that it can't find the gitdb module, maybe this is what's preventing it from building the API docs? If so, is there a way to configure it to install necessary dependencies?