diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css new file mode 100644 index 0000000..9868fd3 --- /dev/null +++ b/docs/_static/css/custom.css @@ -0,0 +1,24 @@ +/* Custom header sizes */ +h1 { + font-size: 1.85em; +} + +h2 { + font-size: 1.55em; +} + +h3 { + font-size: 1.30em; +} + +h4 { + font-size: 1.10em; +} + +h5 { + font-size: 0.90em; +} + +img.sidebar-logo { + width: 40px; +} diff --git a/docs/array/histogram/index.rst b/docs/array/histogram/index.rst new file mode 100644 index 0000000..112f3f6 --- /dev/null +++ b/docs/array/histogram/index.rst @@ -0,0 +1,14 @@ +====================== +khisto.array.histogram +====================== + +.. automodule:: khisto.array.histogram + +Main Modules +============ +.. autosummary:: + :toctree: generated + :recursive: + :nosignatures: + + api diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..7b9672c --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,101 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os +import sys +from pathlib import Path + +sys.path.append("..") +sys.path.append(os.path.join("..", "src")) + +project = 'khisto-python' +copyright = '2026, The Khiops Team' +author = 'The Khiops Team' +release = "0.1.0" # TODO: use pyproject metadata here + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration +# Be strict about any broken references +nitpicky = True + +# To avoid using qualifiers like :class: to reference objects within the same context +default_role = "obj" + +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.intersphinx", + "numpydoc", + "sphinx_copybutton", +] + +## Numpydoc extension config +numpydoc_show_class_members = False + +## Autodoc extension config +autodoc_default_options = { + "members": True, + "inherited-members": False, + "private-members": False, + "show-inheritance": True, + "special-members": False, +} + +## Intersphinx extension config +intersphinx_mapping = { + "python": ("https://docs.python.org/3", None), + "numpy": ("https://numpy.org/doc/stable", None), + "matplotlib": ("https://matplotlib.org/stable", None), +} + +templates_path = ['_templates'] +exclude_patterns = ['_templates', '_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'furo' +html_theme_options = { + "light_css_variables": { + "color-brand-primary": "#FF7900", + "color-brand-content": "#F16E00", + "color-brand-visited": "#FF7900", + "color-sidebar-background": "#FFFFFF", + "color-highlighted-background": "#FFD200", + "color-admonition-title--note": "#FF7900", + "color-admonition-title-background--note": "#FFF0E2", + "font-stack": "Helvetica Neue, Helvetica, sans-serif", + }, + "dark_css_variables": { + "color-brand-primary": "#FF7900", + "color-brand-content": "#F16E00", + "color-brand-visited": "#FF7900", + "color-sidebar-background": "#000000", + "color-highlighted-background": "#FFD200", + "color-admonition-title--note": "#FF7900", + "color-admonition-title-background--note": "#CC6100", + "font-stack": "Helvetica Neue, Helvetica, sans-serif", + }, + # Sets the Github Icon (the SVG is embedded, copied from furo's repo) + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/khiopsml/khisto-python", + "html": """ + + """, + "class": "", + }, + ], +} +html_title = f"