Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pybind classes and documentation not appearing in sphinx docs #790

Closed
reinecke opened this issue Sep 2, 2020 · 2 comments
Closed

Pybind classes and documentation not appearing in sphinx docs #790

reinecke opened this issue Sep 2, 2020 · 2 comments
Labels
bug A problem, flaw, or broken functionality.
Milestone

Comments

@reinecke
Copy link
Collaborator

reinecke commented Sep 2, 2020

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.

@reinecke reinecke added the bug A problem, flaw, or broken functionality. label Sep 2, 2020
@meshula
Copy link
Collaborator

meshula commented Oct 27, 2021

@reinecke Any idea why opentime is not publishing as a submodule? I see that .schema is now in the docs.

@meshula meshula added this to the 1.0 Release milestone Oct 27, 2021
@jminor
Copy link
Collaborator

jminor commented Nov 11, 2021

Closed by #789

@jminor jminor closed this as completed Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A problem, flaw, or broken functionality.
Projects
Development

No branches or pull requests

3 participants