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

Build documentation with mkdocs #38

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

smokestacklightnin
Copy link

@smokestacklightnin smokestacklightnin commented Sep 25, 2024

This PR builds the documentation using mkdocs.

The following is included in this PR:

  • Add mkdocs.yml configuration along with associated javascript and stylesheets
  • Automatically render API docs using mkdocstrings
  • Remove deprecated API docs stored as markdown files in favor of automatically generated API docs. This is advantageous for several reasons, including that developers no longer need to update both docstrings and separate markdown files to document their code.
  • Add modules that should be included to __all__ list in appropriate __init__.py files
  • Move example notebooks to documentation directory so they are rendered in docs
  • Add a deployment workflow for the repository
  • Fix formatting of code and buttons
  • Fix some broken links
  • Use README.md as homepage by creating a softlink to it from the documentation folder

In order to deploy the documentation, a maintainer will need to enable publishing from a branch on this repo for the gh-pages branch after this PR is merged.

Here is a preview of the new documentation

Copy link

@peytondmurray peytondmurray left a comment

Choose a reason for hiding this comment

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

A few changes mentioned below, but also:

Can we have a workflow that also builds (but doesn't deploy) the docs trigger when a PR is made? With the way it currently is currently building on push to master, contributors can easily break documentation without knowing it.

mkdocs-material-

- name: Install Dependencies
run: pip install mkdocs mkdocs-material mkdocstrings[python] griffe-inherited-docstrings mkdocs-autorefs mkdocs-jupyter mkdocs-caption markdown-grid-tables

Choose a reason for hiding this comment

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

Can these be moved into a dedicated optional dependency? pip install '.[docs]' or similar so that the dependencies can actually be tracked.

Copy link
Author

Choose a reason for hiding this comment

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

Done

.github/workflows/cd-docs.yml Outdated Show resolved Hide resolved
@smokestacklightnin
Copy link
Author

Can we have a workflow that also builds (but doesn't deploy) the docs trigger when a PR is made? With the way it currently is currently building on push to master, contributors can easily break documentation without knowing it.

Made this change, mirroring what we've done for the other repos we're working on.

@peytondmurray
Copy link

Hi @hassler-google, is there anything else I can do to help push this forward? It would be great to get this merged.

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