|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# For the full list of built-in configuration values, see the documentation: |
| 4 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 5 | + |
| 6 | +# -- Project information ----------------------------------------------------- |
| 7 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
| 8 | + |
| 9 | +project = 'Google Gen AI SDK' |
| 10 | +copyright = '2024, Google' |
| 11 | +author = 'Google' |
| 12 | + |
| 13 | +# -- General configuration --------------------------------------------------- |
| 14 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 15 | + |
| 16 | +extensions = [] |
| 17 | + |
| 18 | +templates_path = ['_templates'] |
| 19 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 20 | + |
| 21 | +autoclass_content = 'both' |
| 22 | + |
| 23 | +# -- Options for HTML output ------------------------------------------------- |
| 24 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 25 | + |
| 26 | +html_static_path = ['_static'] |
| 27 | + |
| 28 | +import html |
| 29 | +import os |
| 30 | +import sys |
| 31 | +sys.path.insert(0, os.path.abspath('.')) # Add current directory to path |
| 32 | +sys.path.insert(0, os.path.abspath('../google')) |
| 33 | + |
| 34 | +extensions = ['sphinxcontrib.autodoc_pydantic', 'myst_parser', 'sphinx.ext.autodoc', 'sphinx_autodoc_typehints', 'sphinx.ext.napoleon'] |
| 35 | +html_theme = 'furo' |
| 36 | + |
| 37 | +TEXT_FONTS = '"Google Sans Text", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif' |
| 38 | +CODE_FONTS = 'Roboto Mono, "Helvetica Neue Mono", monospace' |
| 39 | +FONT_COLOR_FOR_LIGHT_THEME = 'black' |
| 40 | +FONT_COLOR_FOR_DARK_THEME = 'white' |
| 41 | + |
| 42 | +html_theme_options = { |
| 43 | + "light_css_variables": { |
| 44 | + "font-stack": TEXT_FONTS, |
| 45 | + "font-stack--monospace": CODE_FONTS, |
| 46 | + "font-stack--headings": TEXT_FONTS, |
| 47 | + "color-brand-primary": FONT_COLOR_FOR_LIGHT_THEME, |
| 48 | + "color-brand-content": FONT_COLOR_FOR_LIGHT_THEME, |
| 49 | + }, |
| 50 | + "dark_css_variables": { |
| 51 | + "font-stack": TEXT_FONTS, |
| 52 | + "font-stack--monospace": CODE_FONTS, |
| 53 | + "font-stack--headings": TEXT_FONTS, |
| 54 | + "color-brand-primary": FONT_COLOR_FOR_DARK_THEME, |
| 55 | + "color-brand-content": FONT_COLOR_FOR_DARK_THEME, |
| 56 | + }, |
| 57 | +} |
| 58 | + |
| 59 | +# These folders are copied to the documentation's HTML output |
| 60 | +html_static_path = ['_static'] |
| 61 | + |
| 62 | +# These paths are either relative to html_static_path |
| 63 | +# or fully qualified paths (eg. https://...) |
| 64 | +html_css_files = [ |
| 65 | + 'css/custom.css', |
| 66 | +] |
| 67 | + |
| 68 | +autodoc_pydantic_model_show_json = True |
| 69 | +autodoc_pydantic_model_show_config_summary = False |
0 commit comments