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

[docs] Python documentation generation using Sphinx #1794

Merged
merged 9 commits into from
Oct 21, 2022

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented Oct 11, 2022

Description

This PR introduces a documentation generation process using Sphinx for the Meshroom Python API.

The process also supports including the content of markdown files that belong to the project (such as README.md, INSTALL.md, etc.) for convenience using a custom directive called fetch_md.

The instructions for building the documentation are stored in docs/README.md.

Features list

  • documentation generation process using Sphinx
  • including the content of external markdown files
  • custom documentation for nodes

Implementation remarks

  • we use a custom module.rst template for the autosummary extension in Sphinx to have a more fine-grain control over the stub generation process and to be able to correct errors that occur during that process
  • when importing markdown content with the fetch_md directive, the links based on relative paths are not valid anymore, so we try to re-link them (see the Relinker class), but for now this only works for images
  • the global backend variable was creating import loops, so we removed it and isolated the backend selection in meshroom/common/__init__.py

Note

This PR is not about:

  • writing the docstring of each python object in the project
  • generating documentation for the QML code used for the UI

@mugulmd mugulmd self-assigned this Oct 11, 2022
@mugulmd mugulmd marked this pull request as ready for review October 12, 2022 16:26
@fabiencastan fabiencastan added this to the Meshroom 2022.1.0 milestone Oct 21, 2022
@fabiencastan fabiencastan merged commit a0068c3 into develop Oct 21, 2022
@fabiencastan fabiencastan deleted the dev/lv/sphinxDoc branch October 21, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants