sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.54k stars 2.12k forks source link

Allow custom documenters in autosummary #6264

Open epruesse opened 5 years ago

epruesse commented 5 years ago

Is your feature request related to a problem? Please describe.

I'd like to have autosummary be able to recognize autodoc documenters other than the built-in ones. E.g. celery tasks. Celery brings it's own documenter [1] in an extension, but the typ of task is not recognized.

[1] http://docs.celeryproject.org/en/latest/_modules/celery/contrib/sphinx.html#TaskDocumenter

Describe the solution you'd like

The code below could be turned into a loop with configurable inputs:

https://github.com/sphinx-doc/sphinx/blob/d501bc136ce5069e97a5f347dbc694717dddced8/sphinx/ext/autosummary/generate.py#L192-L198

The list could be automatically, or manually, extended with further documenters, via conf.py or from other extensions.

Describe alternatives you've considered

(The last would be great - although a question is how to know what is available when adapting the jinja template)

epruesse commented 5 years ago

@tk0miya Would it be worth coming up with a PR for this?

tk0miya commented 5 years ago

@epruesse Sorry for late response. Yes, please!

Note: autosummary already knows registered documenters. Simply it does not use them to generate template variables.

mansenfranzen commented 3 years ago

@epruesse @tk0miya I would like to make some progress on this issue. I could provide a PR myself but don't want to duplicate efforts if there is an existing PR already.

mansenfranzen commented 2 years ago

@tk0miya @epruesse Just a friendly reminder if you could provide a short feedback if there has been any PR or approach already for the current issue (see my previous response).