-
Notifications
You must be signed in to change notification settings - Fork 171
[Docs] Add docs with mkdocs
#202
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
Merged
XinranTang
merged 32 commits into
google:master
from
smokestacklightnin:ci/docs/add-docs
Oct 24, 2024
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
49dc26a
Merge pull request #204 from peytondmurray/17-lint-workflow
XinranTang 79eb203
Add mkdocs as optional dependency
smokestacklightnin 34d7b80
Add `mkdocs.yml` along with all necessary files
smokestacklightnin 0d9e6d6
Move icon to `images` folder
smokestacklightnin 15a7747
Add workflow to deploy docs
smokestacklightnin d6a4e36
Ignore test modules
smokestacklightnin 874787d
Fix newline issues in "Raises" and "Returns" sections
smokestacklightnin f24501d
Remove `.md`
smokestacklightnin 476ee22
Add empty `index.md`
smokestacklightnin e0c3c08
Change favicon
smokestacklightnin 2cd9e51
Add attributes to docstring
smokestacklightnin c3131ac
Temporary fix for unused import
smokestacklightnin 27905ca
Fill out Overview section
smokestacklightnin 941dfe0
Use indentation instead of slash character `\`
smokestacklightnin a510016
Add overview from `mlmd.errors` api docs
smokestacklightnin 2649a31
Add `show_if_no_docstring` option to mlmd.errors
smokestacklightnin f5b18b8
Use spaces instead of tabs
smokestacklightnin 4802bb2
Add overview with links.
smokestacklightnin 47960a4
Add link to tutorial
smokestacklightnin ead6757
Fix repo name
smokestacklightnin 18875d8
Rename `root.md` to `index.md`
smokestacklightnin f5de8a5
Change links to point internally
smokestacklightnin 61b75e9
Remove logo
smokestacklightnin 946ef60
Fix broken link
smokestacklightnin 50ed6c1
Fix admonitions
smokestacklightnin 3844057
Add white background to png files
smokestacklightnin a3adca3
Add build docs check on pull request
smokestacklightnin 7f63761
Remove `--verbose` flag
smokestacklightnin 4c2ead1
Fix triggers
smokestacklightnin 040369b
Fix link
smokestacklightnin 4525700
Only trigger on push to master
smokestacklightnin aea4660
Fix linting errors
smokestacklightnin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: deploy-docs | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| pull_request: | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.12 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
| cache: 'pip' | ||
| cache-dependency-path: | | ||
| setup.py | ||
|
|
||
| - name: Save time for cache for mkdocs | ||
| run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
|
|
||
| - name: Caching | ||
| uses: actions/cache@v4 | ||
| with: | ||
| key: mkdocs-material-${{ env.cache_id }} | ||
| path: .cache | ||
| restore-keys: | | ||
| mkdocs-material- | ||
|
|
||
| - name: Install Dependencies | ||
| run: pip install -r requirements-docs.txt | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| if: (github.event_name != 'pull_request') | ||
| run: | | ||
| git config user.name github-actions[bot] | ||
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
| mkdocs gh-deploy --force | ||
|
|
||
| - name: Build docs to check for errors | ||
| run: mkdocs build | ||
| if: (github.event_name == 'pull_request') | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| site_name: "ML Metadata" | ||
| repo_name: "ML Metadata" | ||
| repo_url: https://github.com/google/ml-metadata | ||
|
|
||
| theme: | ||
| name: material | ||
| palette: | ||
| # Palette toggle for automatic mode | ||
| - media: "(prefers-color-scheme)" | ||
| primary: custom | ||
| accent: custom | ||
| toggle: | ||
| icon: material/brightness-auto | ||
| name: Switch to light mode | ||
|
|
||
| # Palette toggle for light mode | ||
| - media: "(prefers-color-scheme: light)" | ||
| primary: custom | ||
| accent: custom | ||
| scheme: default | ||
| toggle: | ||
| icon: material/brightness-7 | ||
| name: Switch to dark mode | ||
|
|
||
| # Palette toggle for dark mode | ||
| - media: "(prefers-color-scheme: dark)" | ||
| primary: custom | ||
| accent: custom | ||
| scheme: slate | ||
| toggle: | ||
| icon: material/brightness-4 | ||
| name: Switch to system preference | ||
| favicon: images/favicon.png | ||
|
|
||
| features: | ||
| - content.code.copy | ||
| - content.code.select | ||
| plugins: | ||
| - search | ||
| - autorefs | ||
| - mkdocstrings: | ||
| default_handler: python | ||
| handlers: | ||
| python: | ||
| options: | ||
| show_source: true | ||
| show_root_heading: true | ||
| unwrap_annotated: true | ||
| show_symbol_type_toc: true | ||
| show_symbol_type_heading: true | ||
| merge_init_into_class: true | ||
| show_signature_annotations: true | ||
| separate_signature: true | ||
| signature_crossrefs: true | ||
| group_by_category: true | ||
| show_category_heading: true | ||
| inherited_members: true | ||
| show_submodules: true | ||
| show_object_full_path: false | ||
| show_root_full_path: true | ||
| docstring_section_style: "spacy" | ||
| summary: true | ||
| filters: | ||
| - "!^_" | ||
| - "^__init__$" | ||
| - "^__call__$" | ||
| - "!^logger" | ||
| - "!_test$" | ||
| extensions: | ||
| - griffe_inherited_docstrings | ||
| import: | ||
| - https://docs.python.org/3/objects.inv | ||
| - caption: | ||
| figure: | ||
| ignore_alt: true | ||
|
|
||
| markdown_extensions: | ||
| - admonition | ||
| - attr_list | ||
| - toc: | ||
| permalink: true | ||
| - pymdownx.highlight: | ||
| anchor_linenums: true | ||
| linenums: false | ||
| line_spans: __span | ||
| pygments_lang_class: true | ||
| - pymdownx.inlinehilite | ||
| - pymdownx.snippets | ||
| - pymdownx.superfences | ||
| - pymdownx.arithmatex: | ||
| generic: true | ||
| - md_in_html | ||
| - pymdownx.emoji: | ||
| emoji_index: !!python/name:material.extensions.emoji.twemoji | ||
| emoji_generator: !!python/name:material.extensions.emoji.to_svg | ||
|
|
||
| extra_css: | ||
| - stylesheets/extra.css | ||
|
|
||
| extra_javascript: | ||
| - javascripts/mathjax.js | ||
| - https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js | ||
|
|
||
| watch: | ||
| - ml_metadata | ||
| nav: | ||
| - Guide: index.md | ||
| - Tutorial: https://tensorflow.github.io/tfx/tutorials/mlmd/mlmd_tutorial/ | ||
| - API: | ||
| - mlmd: | ||
| - Overview: api/mlmd/index.md | ||
| - mlmd: api/mlmd/mlmd.md | ||
| - mlmd.errors: | ||
| - Overview: api/mlmd.errors/index.md | ||
| - mlmd.errors: api/mlmd.errors/mlmd.errors.md | ||
| - mlmd.proto: | ||
| - Overview: api/mlmd.proto/index.md | ||
| - mlmd.proto: api/mlmd.proto/mlmd.proto.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.