Skip to content

Commit dfd8d8c

Browse files
committed
chore: add Sphinx configuration file
Edited to add extensions and customizations.
1 parent ca10548 commit dfd8d8c

1 file changed

Lines changed: 101 additions & 0 deletions

File tree

docs/conf.py

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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+
# Be strict about any broken references
23+
nitpicky = True
24+
25+
# To avoid using qualifiers like :class: to reference objects within the same context
26+
default_role = "obj"
27+
28+
extensions = [
29+
"sphinx.ext.autodoc",
30+
"sphinx.ext.autosummary",
31+
"sphinx.ext.intersphinx",
32+
"numpydoc",
33+
"sphinx_copybutton",
34+
]
35+
36+
## Numpydoc extension config
37+
numpydoc_show_class_members = False
38+
39+
## Autodoc extension config
40+
autodoc_default_options = {
41+
"members": True,
42+
"inherited-members": False,
43+
"private-members": False,
44+
"show-inheritance": True,
45+
"special-members": False,
46+
}
47+
48+
## Intersphinx extension config
49+
intersphinx_mapping = {
50+
"python": ("https://docs.python.org/3", None),
51+
"numpy": ("https://numpy.org/doc/stable", None),
52+
"matplotlib": ("https://matplotlib.org/stable", None),
53+
}
54+
55+
templates_path = ['_templates']
56+
exclude_patterns = ['_templates', '_build', 'Thumbs.db', '.DS_Store']
57+
58+
59+
60+
# -- Options for HTML output -------------------------------------------------
61+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
62+
63+
html_theme = 'furo'
64+
html_theme_options = {
65+
"light_css_variables": {
66+
"color-brand-primary": "#FF7900",
67+
"color-brand-content": "#F16E00",
68+
"color-brand-visited": "#FF7900",
69+
"color-sidebar-background": "#FFFFFF",
70+
"color-highlighted-background": "#FFD200",
71+
"color-admonition-title--note": "#FF7900",
72+
"color-admonition-title-background--note": "#FFF0E2",
73+
"font-stack": "Helvetica Neue, Helvetica, sans-serif",
74+
},
75+
"dark_css_variables": {
76+
"color-brand-primary": "#FF7900",
77+
"color-brand-content": "#F16E00",
78+
"color-brand-visited": "#FF7900",
79+
"color-sidebar-background": "#000000",
80+
"color-highlighted-background": "#FFD200",
81+
"color-admonition-title--note": "#FF7900",
82+
"color-admonition-title-background--note": "#CC6100",
83+
"font-stack": "Helvetica Neue, Helvetica, sans-serif",
84+
},
85+
# Sets the Github Icon (the SVG is embedded, copied from furo's repo)
86+
"footer_icons": [
87+
{
88+
"name": "GitHub",
89+
"url": "https://github.com/khiopsml/khisto-python",
90+
"html": """
91+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
92+
<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>
93+
</svg>
94+
""",
95+
"class": "",
96+
},
97+
],
98+
}
99+
html_title = f"<h6><center>{project} {release}</center></h6>"
100+
html_static_path = ['_static']
101+
html_css_files = ["css/custom.css"]

0 commit comments

Comments
 (0)