machow / quartodoc

Generate API documentation with quarto
https://machow.github.io/quartodoc
MIT License
185 stars 21 forks source link

Automatic recursive summary of all attributes in a package #319

Closed joelostblom closed 10 months ago

joelostblom commented 10 months ago

Sphinx autosummary has a resursive option, which essentially find all functions, methods, classes, etc in a package and documents them automatically without the need to type in the name of each one of them. This is very helpful for large APIs. When I looked through the videos and docs for quartodoc, I didn't see a similar option. Is there a way to achieve this with quartodoc currently or does one need to type out each name individually?

Related links:

machow commented 10 months ago

Hey, sorry for the wait, and thanks for digging into this. Do you have any examples of tools using recursive?

I'm a bit stumped--since I know of the option, but have never seen it in practice. For example, pandas, polars, numpy, IPython, scikit all have large APIs, but define everything manually. (I'm sure there's a package out there that uses it, and would be curious to see!).

Is there a way to achieve this with quartodoc currently or does one need to type out each name individually?

I wonder if one of these two things could get close to what you're looking for (see documenting members):

If you can point to the package you're looking to document, I'm happy to take a look!

joelostblom commented 10 months ago

Thank for the reply! I didn't realize that it was already possible to recursively add class by including the module name in the config. That should probably be enough for my use case then.

Regarding tools using recursive, I think you're right that many of the most popular don't. I wonder if it is because it is newer or because of the limitations listed in https://github.com/sphinx-doc/sphinx/issues/7912 . I noticed that there is a sphinx theme that tries to solve this by including their own api generation for all python functions, leaving it here in case it is useful https://sphinx-immaterial.readthedocs.io/en/latest/apidoc/python/apigen.html. Since it seems like quartodoc already might have enough functionality via the methods you mentioned, I will close this an re-open if I run into issues with the above approaches, thanks again!

machow commented 10 months ago

Thanks for digging in more -- it seems like there will be some helpful threads to pull with apigen!