Skip to content

Hide private submodules from documentation #16

@bkeryan

Description

@bkeryan

Tech Debt

The documentation configuration currently uses autoapi-skip-member to prevent sphinx-autoapi from documenting class definitions in private submodules:

def skip_aliases(app, what, name, obj, skip, options):
    """Skip documentation for classes that are exported from multiple modules."""
    # For names that are defined in a private sub-module and aliased into a
    # public package, hide the definition.
    if name.startswith("nitypes.time._") or name.startswith("nitypes.waveform._"):
        skip = True

    return skip


def setup(sphinx):
    """Sphinx setup callback."""
    sphinx.connect("autoapi-skip-member", skip_aliases)

It would be better to use :canonical:, but I don't know how to do this without support from sphinx-autoapi upstream.

Upstream issue: readthedocs/sphinx-autoapi#411

AB#3112717

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions