Skip to content

Can't get sphinx.autodoc to work sensibly for registries #301

@jacobcook1995

Description

@jacobcook1995

Is your feature request related to a problem? Please describe.
We have added various registries containing objects that are needed to get each model to run, e.g. the CONSTANTS_REGISTRY which contains the constants classes for each model. Part of the motivation for making these registries is ease of documentation.

However, I can't get the sphinx extension autodoc to generate sensible output when trying to document the registry. automodule, autoclass and autodata all document the registry but don't document the classes contained within it.

Describe the solution you'd like
We either need to work out how to get sphinx.autodoc to play nicely with registries, or find an alternative way of automatically documenting the contents of the relevant registries.

Describe alternatives you've considered
I tried to write a custom sphinx directive to handle this automatic documentation, but hit a bit of a brick wall. I think this was mainly my lack of familiarity with docutils (which sphinx is based on) though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions