Panda 1.1 API docs

In the past, the Python API for Panda has been documented using epydoc (see https://www.panda3d.org/manual/epydoc/). Now that interrogate creates Python types rather than Python classes (as I understand it), and there is no python source to look at for the pandac tree, it seems like seeing what’s available in the python interface is going to become a lot more difficult.

Has anyone thought about how to address this? Is there a solution already that I don’t know about? I guess you could use doxygen or something to create docs from the C++ source, but it might be tricky to separate out only the PUBLISHED portions. You also have to handle the python bits that are grafted on at the end, like the slew of convenience methods added to NodePath.

Perhaps interrogate should be generating some kind of documentation itself (sounds like a big project). Or perhaps interrogate could dump out some code on the side that wouldn’t actually be run, but could be used to generate documentation using epydoc or another tool.

I’m not sure if this is really changed fundamentally. It is true that interrogate is generating Python types rather than classes, but it still sets up the docstrings on those types exactly the same way it used to write them to the *.py files it used to generate.

I don’t know much about epydoc, but couldn’t it just import PandaModules the same way it presumably always did, and walk through all of the types it finds, and the methods on those types, outputting the docstrings as it finds them? The Python-side interface for all this should be pretty much exactly the same as it ever was. If epydoc is itself a Python program, I don’t know if it will even notice the difference.

David

I tried running epydoc on the new build, but there were problems.

From my understanding, epydoc uses a combination of inspection of imported modules and inspection of actual files on disk. I think it looks on disk mostly to figure out what modules it should be documenting, so perhaps this problem can be easily solved. I’m also not sure about its ability to handle types as opposed to classes. It’s encouraging to know that all of the docstrings are still there to be found.

I’ll look into this at some point.