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

feat: add demonstration of Sphinx documentation system #732

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mattmazzola
Copy link
Contributor

⚠️ This PR is not intended to be merged directly, but to demonstrate documentation from our fork ⚠️

Issue

Current documentation in Metaseq repo is very minimal.

  • Given the complexity of pipeline and various entry points it can be difficult for newcomers to get started
  • Documentation features are limited by Github's rendering of Markdown files viewed within the repository
  • Documentation isn't centrally located
    • It is nice to co-locate doc files near the content they are documenting by placing it near in file system, but this can make it hard to understand the bigger picture which connects all information

We also had the intention of publishing results to 3rd parties and wanted the pages to look more professional than viewing a file of repository.

Solution

  • Use Sphinx python documentation generation system
    • Sphinx uses the reStructuredText markup language by default, and can read MyST markdown via third-party extensions

    • Centrally locates documentation (Although can still link to markdown files in repo if desired)
    • Can generate documentation from code (and docstrings)
    • Can render Mermaid diagrams (Although I think Github can do that too now)

Testing steps

There were some errors during docs generation since we don't have correct dependencies and can't properly embed/generate docs from metaseq.cli.validate but the concept should work for a real Metaseq environment

Visuals

Screenshot of Demo Docs

image

Video

2023-06-09_09-29-46.mp4

Development on Documentation

Terminal A:

make serve

(Open URL and view index.html)

image

Terminal B:

make watch

Regenerates documentation after file changes

Related to #726

Mentioning @tupini07 for awareness and possible assistance to answer questions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see in the video of PR description, our documentation has many more files, but I removed almost all of them except for this PR

This folder to demonstrates how to use rST and markdown syntax within Sphinx to achieve what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants