Skip to content

Allow custom documenters in autosummary #6264

@epruesse

Description

@epruesse

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:

ns['members'] = dir(obj)
ns['functions'], ns['all_functions'] = \
get_members(obj, 'function', imported=imported_members)
ns['classes'], ns['all_classes'] = \
get_members(obj, 'class', imported=imported_members)
ns['exceptions'], ns['all_exceptions'] = \
get_members(obj, 'exception', imported=imported_members)

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

Describe alternatives you've considered

  • configure via conf.py
  • configure from other extension
  • determine directly from registered documenters

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions