Skip to content

Commit 53c94b8

Browse files
authored
feat: Add /docs used to deploy documentation to GitHub Pages (#553)
1 parent 8df3ea3 commit 53c94b8

File tree

7 files changed

+105
-4
lines changed

7 files changed

+105
-4
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,7 @@ tramp
178178
.\#*
179179

180180
# Sphinx documentation
181-
doc/_build/
182-
doc/auto_examples/
181+
sphinx/build/
182+
sphinx/auto_examples/
183+
sphinx/generated/
184+
sphinx/sg_execution_times.rst

.pre-commit-config.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
exclude: |
2+
(?x)
3+
(fixtures/)|
4+
(^sphinx/)|
5+
(^docs/)
6+
17
repos:
28
- repo: https://github.com/pre-commit/pre-commit-hooks
39
rev: v5.0.0
@@ -52,5 +58,3 @@ repos:
5258
name: Use stylelint to lint CSS.
5359
entry: bash -c "cd skore-ui && npm run style-lint"
5460
files: ^skore-ui/
55-
56-
exclude: fixtures/

docs/.nojekyll

Whitespace-only changes.

docs/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<head>
2+
<meta http-equiv="refresh" content="0;latest/index.html">
3+
</head>

skore/pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ test = [
7777
"scikit-learn",
7878
]
7979

80+
sphinx = [
81+
"sphinx",
82+
"pydata-sphinx-theme",
83+
"sphinx-gallery",
84+
"sphinx-design",
85+
"matplotlib",
86+
"scikit-learn",
87+
"numpydoc",
88+
]
89+
8090
[tool.pytest.ini_options]
8191
addopts = [
8292
"--doctest-modules",

sphinx/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

sphinx/conf.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 = "skore"
10+
copyright = "2024, Probabl team"
11+
author = "Probabl team"
12+
version = "0"
13+
release = "0"
14+
15+
# -- General configuration ---------------------------------------------------
16+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
17+
18+
extensions = [
19+
"numpydoc",
20+
"sphinx.ext.autosummary",
21+
"sphinx.ext.githubpages",
22+
"sphinx.ext.intersphinx",
23+
"sphinx_design",
24+
"sphinx_gallery.gen_gallery",
25+
]
26+
templates_path = ["_templates"]
27+
exclude_patterns = ["build", "Thumbs.db", ".DS_Store"]
28+
29+
# Add any paths that contain templates here, relative to this directory.
30+
templates_path = ["_templates"]
31+
32+
# -- Options for HTML output -------------------------------------------------
33+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
34+
35+
html_theme = "pydata_sphinx_theme"
36+
html_static_path = ["_static"]
37+
38+
html_css_files = [
39+
"css/custom.css",
40+
]
41+
html_js_files = []
42+
43+
# sphinx_gallery options
44+
sphinx_gallery_conf = {
45+
"examples_dirs": "../examples", # path to example scripts
46+
"gallery_dirs": "auto_examples", # path to gallery generated output
47+
}
48+
49+
# intersphinx configuration
50+
intersphinx_mapping = {
51+
"sklearn": ("https://scikit-learn.org/stable/", None),
52+
}
53+
54+
numpydoc_show_class_members = False
55+
56+
html_title = "skore"
57+
58+
html_theme_options = {
59+
"announcement": (
60+
"https://raw.githubusercontent.com/soda-inria/hazardous/main/doc/announcement.html"
61+
),
62+
}

0 commit comments

Comments
 (0)