Skip to content

Conversation

@smokestacklightnin
Copy link
Collaborator

@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
Collaborator

@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
Copy link
Collaborator

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
Collaborator Author

Choose a reason for hiding this comment

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

Done

@smokestacklightnin
Copy link
Collaborator 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
Collaborator

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

Copy link
Collaborator

@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.

Wow, this one was a lot of work. Thanks for this!

One request: can the docs_dir be the default docs/? Or is there some reason to have them be under g3doc?

@smokestacklightnin
Copy link
Collaborator Author

One request: can the docs_dir be the default docs/?

@peytondmurray Done

@peytondmurray peytondmurray merged commit 83f9b1f into google:master Aug 12, 2025
2 checks passed
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