robotools / vanilla

A Pythonic wrapper around Cocoa.
MIT License
78 stars 28 forks source link

Missings docs (FloatingWindow, Window…) #207

Open justinpenner opened 8 months ago

justinpenner commented 8 months ago

https://vanilla.robotools.dev/en/latest/objects/Window.html https://vanilla.robotools.dev/en/latest/objects/FloatingWindow.html

Most doc pages begin with the class constructor and some examples and descriptions, like the image below. This is missing from the Window and FloatingWindow doc pages linked above. It seems like these two classes are documented properly in the source code, so maybe there is a small syntax error preventing them from being pulled into the docs?

image

Additionally, I noticed two doc pages are completely empty:

https://vanilla.robotools.dev/en/latest/objects/Sheet.html https://vanilla.robotools.dev/en/latest/objects/List.html

justvanrossum commented 8 months ago

Would you be willing to contribute a PR?

justinpenner commented 8 months ago

I'll take a closer look. I've never used Sphinx before, but I think I understand the gist of how it works (class/method defs and docstrings w/ markup are parsed into .rst format, then Sphinx generates .html doc pages).

justinpenner commented 8 months ago

I suspect Window and FloatingWindow are being excluded due to their inheritance of NSObject. I noticed the Sphinx conf.py has a Mock class that seems to have a list of classes to be ignored. If that's where the problem lies, I'm not sure whether to remove NSObject from Mock.__all__, or if it would be enough to simply remove :inherited-members: from the autoclass declaration in Window.rst.

If anyone more knowledgeable of Sphinx can finish solving this, please do. Otherwise I'll come back to this later when I have time to clone the repo and figure out how to run Sphinx.