|
| 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 | +import os |
| 9 | +import sys |
| 10 | +from pathlib import Path |
| 11 | + |
| 12 | +sys.path.append("..") |
| 13 | +sys.path.append(os.path.join("..", "src")) |
| 14 | + |
| 15 | +project = 'khisto-python' |
| 16 | +copyright = '2026, The Khiops Team' |
| 17 | +author = 'The Khiops Team' |
| 18 | +release = "0.1.0" # TODO: use pyproject metadata here |
| 19 | + |
| 20 | +# -- General configuration --------------------------------------------------- |
| 21 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 22 | +# Do not be strict about any broken references, because of Sphinx limitations in |
| 23 | +# getting the Numpy scalar type references: |
| 24 | +# see https://github.com/sphinx-doc/sphinx/issues/10974 |
| 25 | +nitpicky = False |
| 26 | + |
| 27 | +# To avoid using qualifiers like :class: to reference objects within the same context |
| 28 | +default_role = "obj" |
| 29 | + |
| 30 | +extensions = [ |
| 31 | + "sphinx.ext.autodoc", |
| 32 | + "sphinx.ext.autosummary", |
| 33 | + "sphinx.ext.intersphinx", |
| 34 | + "numpydoc", |
| 35 | + "sphinx_copybutton", |
| 36 | +] |
| 37 | + |
| 38 | +## Numpydoc extension config |
| 39 | +numpydoc_show_class_members = False |
| 40 | + |
| 41 | +## Autodoc extension config |
| 42 | +autodoc_default_options = { |
| 43 | + "members": True, |
| 44 | + "inherited-members": False, |
| 45 | + "private-members": False, |
| 46 | + "show-inheritance": True, |
| 47 | + "special-members": False, |
| 48 | +} |
| 49 | + |
| 50 | +## Intersphinx extension config |
| 51 | +intersphinx_mapping = { |
| 52 | + "python": ("https://docs.python.org/3", None), |
| 53 | + "numpy": ("https://numpy.org/doc/stable", None), |
| 54 | + "matplotlib": ("https://matplotlib.org/stable", None), |
| 55 | +} |
| 56 | + |
| 57 | +templates_path = ['_templates'] |
| 58 | +exclude_patterns = ['_templates', '_build', 'Thumbs.db', '.DS_Store'] |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +# -- Options for HTML output ------------------------------------------------- |
| 63 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 64 | + |
| 65 | +html_theme = 'furo' |
| 66 | +html_theme_options = { |
| 67 | + "light_css_variables": { |
| 68 | + "color-brand-primary": "#FF7900", |
| 69 | + "color-brand-content": "#F16E00", |
| 70 | + "color-brand-visited": "#FF7900", |
| 71 | + "color-sidebar-background": "#FFFFFF", |
| 72 | + "color-highlighted-background": "#FFD200", |
| 73 | + "color-admonition-title--note": "#FF7900", |
| 74 | + "color-admonition-title-background--note": "#FFF0E2", |
| 75 | + "font-stack": "Helvetica Neue, Helvetica, sans-serif", |
| 76 | + }, |
| 77 | + "dark_css_variables": { |
| 78 | + "color-brand-primary": "#FF7900", |
| 79 | + "color-brand-content": "#F16E00", |
| 80 | + "color-brand-visited": "#FF7900", |
| 81 | + "color-sidebar-background": "#000000", |
| 82 | + "color-highlighted-background": "#FFD200", |
| 83 | + "color-admonition-title--note": "#FF7900", |
| 84 | + "color-admonition-title-background--note": "#CC6100", |
| 85 | + "font-stack": "Helvetica Neue, Helvetica, sans-serif", |
| 86 | + }, |
| 87 | + # Sets the Github Icon (the SVG is embedded, copied from furo's repo) |
| 88 | + "footer_icons": [ |
| 89 | + { |
| 90 | + "name": "GitHub", |
| 91 | + "url": "https://github.com/khiopsml/khisto-python", |
| 92 | + "html": """ |
| 93 | + <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16"> |
| 94 | + <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path> |
| 95 | + </svg> |
| 96 | + """, |
| 97 | + "class": "", |
| 98 | + }, |
| 99 | + ], |
| 100 | +} |
| 101 | +html_title = f"<h6><center>{project} {release}</center></h6>" |
| 102 | +html_static_path = ['_static'] |
| 103 | +html_css_files = ["css/custom.css"] |
0 commit comments