microsoft/onnxruntime-extensions
Publicmirrored from https://github.com/microsoft/onnxruntime-extensionsAvailable
docs/python/conf.py
104lines · modeblame
d39e8444Sayan Shaw2 years ago | 1 | # Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | # Licensed under the MIT License. | |
| 3 | # pylint: disable=C0103 | |
| 4 | | |
| 5 | # -*- coding: utf-8 -*- | |
| 6 | # | |
| 7 | # Configuration file for the Sphinx documentation builder. | |
| 8 | | |
| 9 | import os | |
| 10 | import shutil # noqa: F401 | |
| 11 | import sys | |
| 12 | from datetime import datetime | |
| 13 | | |
| 14 | # import recommonmark | |
| 15 | | |
| 16 | # -- Project information ----------------------------------------------------- | |
| 17 | | |
| 18 | project = "ONNXRuntime-Extensions Python API" | |
| 19 | copyright = f"2018-{datetime.now().year}, Microsoft" | |
| 20 | author = "Microsoft" | |
| 21 | | |
| 22 | # -- General configuration --------------------------------------------------- | |
| 23 | | |
| 24 | extensions = [ | |
| 25 | "sphinx.ext.intersphinx", | |
| 26 | "sphinx.ext.imgmath", | |
| 27 | "sphinx.ext.ifconfig", | |
| 28 | "sphinx.ext.viewcode", | |
| 29 | "sphinx.ext.autodoc", | |
| 30 | "sphinx.ext.githubpages", | |
| 31 | "sphinx_gallery.gen_gallery", | |
| 32 | "sphinx.ext.graphviz", | |
| 33 | "pyquickhelper.sphinxext.sphinx_runpython_extension", | |
| 34 | "sphinxcontrib.googleanalytics", | |
| 35 | "sphinx.ext.napoleon", | |
| 36 | ] | |
| 37 | | |
| 38 | templates_path = ["_templates"] | |
| 39 | | |
| 40 | source_parsers = { | |
| 41 | ".md": "recommonmark.parser.CommonMarkParser", | |
| 42 | } | |
| 43 | | |
| 44 | source_suffix = [".rst"] # , '.md'] | |
| 45 | | |
| 46 | master_doc = "index" | |
| 47 | language = "en" | |
| 48 | exclude_patterns = [] | |
| 49 | pygments_style = "default" | |
| 50 | autoclass_content = "both" | |
| 51 | master_doc = "index" | |
| 52 | pygments_style = "sphinx" | |
| 53 | | |
| 54 | # -- Options for HTML output ------------------------------------------------- | |
| 55 | | |
| 56 | html_logo = "ONNX_Runtime_icon.png" | |
| 57 | html_static_path = ["_static"] | |
| 58 | html_theme = "furo" | |
| 59 | graphviz_output_format = "svg" | |
| 60 | | |
| 61 | html_context = { | |
| 62 | "default_mode": "auto", # auto: the documentation theme will follow the system default that you have set (light or dark) | |
| 63 | } | |
| 64 | | |
| 65 | html_theme_options = { | |
| 66 | "collapse_navigation": True, | |
| 67 | "external_links": [ | |
| 68 | {"name": "onnxruntime", "url": "https://onnxruntime.ai/"}, | |
| 69 | {"name": "github", "url": "https://github.com/microsoft/onnxruntime-extensions"}, | |
| 70 | ], | |
| 71 | "github_url": "https://github.com/microsoft/onnxruntime-extensions", | |
| 72 | "navbar_center": [], | |
| 73 | "navigation_depth": 5, | |
| 74 | "page_sidebar_items": [], # default setting is: ["page-toc", "edit-this-page", "sourcelink"], | |
| 75 | "show_nav_level": 0, | |
| 76 | "show_prev_next": True, | |
| 77 | "show_toc_level": 0, | |
| 78 | # needed for sphinx 6.0 | |
| 79 | "logo": { | |
| 80 | "text": project, | |
| 81 | "image_light": html_logo, | |
| 82 | "image_dark": html_logo, | |
| 83 | "alt_text": project, | |
| 84 | }, | |
| 85 | } | |
| 86 | | |
| 87 | # -- Options for Google Analytics ------------------------------------------------- | |
| 88 | | |
| 89 | googleanalytics_id = "UA-156955408-1" | |
| 90 | | |
| 91 | # -- Options for intersphinx extension --------------------------------------- | |
| 92 | | |
| 93 | # Example configuration for intersphinx: refer to the Python standard library. | |
| 94 | intersphinx_mapping = { | |
| 95 | "python": ("https://docs.python.org/3", None), | |
| 96 | "numpy": ("https://numpy.org/doc/stable", None), | |
| 97 | "torch": ("https://pytorch.org/docs/stable/", None), | |
| 98 | } | |
| 99 | | |
| 100 | # -- Options for Sphinx Gallery ---------------------------------------------- | |
| 101 | | |
| 102 | sphinx_gallery_conf = { | |
| 103 | "examples_dirs": "examples", | |
| 104 | } |