Skip to content

Pybind classes and documentation not appearing in sphinx docs #790

@reinecke

Description

@reinecke

In the sphinx-generated documentation, the pure C++ classes and remapped functions aren't having documentation generated. For instance, look at the opentime module: https://opentimelineio.readthedocs.io/en/latest/api/modules/opentimelineio.html#module-opentimelineio.opentime

Missing from those docs is:

  • `RationalTime
  • TimeRange
  • TimeTransform
  • from_frames
  • from_timecode
  • from_time_string
  • from_seconds
  • range_from_start_end_time
  • duration_from_start_end_time

This is not limited to opentime, opentimelineio.schema is also missing docs: https://opentimelineio.readthedocs.io/en/latest/api/modules/opentimelineio.schema.html

To Reproduce

I encountered on macOS 10.15 with Python 3.8, but this is also happening on the live RTD docs so I suspect it's independent of those.

  1. pip install sphinx_rtd_theme sphinx recommonmark
  2. In the root Makefile under the doc-html target, follow the local build instructions to comment out tox and uncomment sphinx-build.
  3. python setup.py install && make doc-html
  4. View file:///private/var/tmp/otio-docs/html/api/modules/opentimelineio.html#opentimelineio-opentime-module

Expected Behavior

There should be documentation for all classes and functions.

Additional Context

I think this is an issue with the combo of the way C++ implementations are re-namespaced and autodoc does not want to re-document everywhere a given class or function is used so it avoids including documentation. Unfortunately this may mean apidoc cannot be used to generate the directives in the docs/api/modules directory and many autodoc directives will have to be hand-added to their relevant sections.

I attempted using this hook: https://www.sphinx-doc.org/en/1.8/usage/extensions/autodoc.html#event-autodoc-skip-member
However, even when hard-coded to return False, the imported members still weren't included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem, flaw, or broken functionality.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions