What is the "generated" option in the Sphinx autosummary directive?

I use sphinx api-doc and autosummary extensions to document the API for the library, and I really can't understand the purpose of the generated/ below option:

 .. autosummary:: :nosignatures: :toctree: generated/ module.function_1 module.function_2 ... 

I saw that this is sphinx documentation as well as in libraries like pandas. I use toctree and my API autogenerates, but I don’t understand what is generated. I do not see the generated folder and I do not know what this advantage / purpose of this is.

thanks

+5
source share
1 answer

The "generated" option is the name of the output directory in which Sphinx places the automatically generated "stub" .rst files. It does not need to be called "generated"; you can use any name.

If the autosummary_generate configuration autosummary_generate set to True , Sphinx generates a .rst file for each entry specified in autosummary . For example, if you are documenting a module with several classes, this function can be used to place complete documentation for each class on a separate page. The autocomplete table will contain links to these pages.

+4
source

Source: https://habr.com/ru/post/1208551/


All Articles