Skip to content

Commit 5f4b7c9

Browse files
committed
Autogenerate the docs
1 parent 0e618f2 commit 5f4b7c9

16 files changed

Lines changed: 95 additions & 53 deletions

.github/workflows/main.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: deploy-book
1+
name: deploy-docs
22

33
on:
44
push:
55
branches:
66
- main
77

88
jobs:
9-
deploy-book:
9+
deploy-docs:
1010
runs-on: ubuntu-latest
1111
permissions:
1212
pages: write
@@ -21,23 +21,22 @@ jobs:
2121
python-version: 3.13
2222

2323
- name: Install project and dependencies
24-
run: pip install -e .[dev]
24+
run: pip install -e .[docs]
2525

2626
- name: Cache executed notebooks
2727
uses: actions/cache@v4
2828
with:
29-
path: _build/.jupyter_cache
30-
key: jupyter-book-cache-${{ hashFiles('pyproject.toml') }}
29+
path: docs/_build/.jupyter_cache
30+
key: jupyter-cache-${{ hashFiles('pyproject.toml') }}
31+
restore-keys: jupyter-cache-
3132

32-
- name: Build the book
33-
run: |
34-
cd jupyter
35-
jupyter-book build .
33+
- name: Build the docs
34+
run: sphinx-build -b html docs docs/_build/html
3635

37-
- name: Upload the book as an artifact
36+
- name: Upload as a GitHub Pages artifact
3837
uses: actions/upload-pages-artifact@v3
3938
with:
40-
path: "jupyter/_build/html"
39+
path: "docs/_build/html"
4140

4241
- name: Deploy to GitHub Pages
4342
id: deployment

docs/_static

Whitespace-only changes.

docs/conf.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import os
2+
import sys
3+
sys.path.insert(0, os.path.abspath('../src'))
4+
5+
# -- Project information -----------------------------------------------------
6+
project = 'Flexible Subset Selection Examples'
7+
author = 'Connor Bailey'
8+
copyright = '2025, Connor Bailey'
9+
release = '0.2'
10+
11+
# -- Extensions ----------------------------------------------------------------
12+
extensions = [
13+
'myst_nb',
14+
'sphinx.ext.autodoc',
15+
'sphinx.ext.napoleon',
16+
'sphinx.ext.autosummary',
17+
'sphinx_autodoc_typehints',
18+
'sphinx_copybutton',
19+
'sphinx.ext.mathjax',
20+
'sphinx_togglebutton',
21+
'sphinx_design',
22+
'autoapi.extension'
23+
]
24+
myst_enable_extensions = [
25+
"dollarmath",
26+
"colon_fence",
27+
"amsmath",
28+
]
29+
30+
# -- HTML output ---------------------------------------------------------------
31+
html_theme = 'sphinx_book_theme'
32+
html_static_path = ['_static']
33+
html_logo = None
34+
html_title = project
35+
36+
html_theme_options = {
37+
"repository_url": "https://github.com/uwgraphics/flexibleSubsetSelection",
38+
"repository_branch": "main",
39+
"use_repository_button": True,
40+
"use_issues_button": True,
41+
"use_edit_page_button": True,
42+
"path_to_docs": "docs",
43+
}
44+
45+
# -- AutoAPI configuration -----------------------------------------------------
46+
autoapi_type = 'python'
47+
autoapi_dirs = ['../src/flexibleSubsetSelection']
48+
autosummary_generate = True
49+
autoapi_add_toctree_entry = False
50+
autoapi_root = 'api'
51+
52+
# Paths and excludes
53+
templates_path = ['_templates']
54+
exclude_patterns = ['_build', '**.ipynb_checkpoints']
55+
nb_execution_mode = "off"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)