Skip to content

Commit 1803168

Browse files
authored
Merge pull request #161 from ComputationalPhysiology/sphinx-docs
Use sphinx instead of jupyter-book
2 parents 475aa2a + 2278ac7 commit 1803168

File tree

4 files changed

+94
-56
lines changed

4 files changed

+94
-56
lines changed

.github/workflows/build_docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-22.04
1414
env:
15-
PUBLISH_DIR: ./_build/html
15+
PUBLISH_DIR: ./_build
1616

1717

1818
steps:
@@ -22,13 +22,13 @@ jobs:
2222
- name: Setup Python
2323
uses: actions/setup-python@v6
2424
with:
25-
python-version: "3.10"
25+
python-version: "3.12"
2626

2727
- name: Install dependencies
2828
run: python3 -m pip install ".[docs]"
2929

3030
- name: Build docs
31-
run: jupyter-book build -W --keep-going .
31+
run: python3 -m sphinx -b html . ${{ env.PUBLISH_DIR }}
3232

3333
- name: Upload artifact
3434
uses: actions/upload-pages-artifact@v4

_config.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

conf.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
###############################################################################
2+
# Auto-generated by `jupyter-book config`
3+
# If you wish to continue using _config.yml, make edits to that file and
4+
# re-generate this one.
5+
###############################################################################
6+
author = "Henrik Finsberg og Kristian Hustad"
7+
comments_config = {"hypothesis": False, "utterances": False}
8+
copyright = "2025"
9+
exclude_patterns = [
10+
"**.ipynb_checkpoints",
11+
".DS_Store",
12+
".github/*",
13+
".pytest_cache/*",
14+
"Thumbs.db",
15+
"_build",
16+
"**.jupyter_cache",
17+
]
18+
extensions = [
19+
"sphinx_togglebutton",
20+
"sphinx_copybutton",
21+
"myst_nb",
22+
"jupyter_book",
23+
"sphinx_thebe",
24+
"sphinx_comments",
25+
"sphinx_external_toc",
26+
"sphinx.ext.intersphinx",
27+
"sphinx_design",
28+
"sphinx_book_theme",
29+
"sphinx.ext.autodoc",
30+
"sphinx.ext.napoleon",
31+
"sphinx.ext.viewcode",
32+
"sphinx_jupyterbook_latex",
33+
"sphinx_multitoc_numbering",
34+
]
35+
external_toc_exclude_missing = True
36+
external_toc_path = "_toc.yml"
37+
html_baseurl = ""
38+
html_favicon = ""
39+
html_last_updated_fmt = "%b %d, %Y"
40+
html_logo = "docs/logo.png"
41+
html_sourcelink_suffix = ""
42+
html_theme = "sphinx_book_theme"
43+
html_theme_options = {
44+
"search_bar_text": "Search this book...",
45+
"launch_buttons": {
46+
"notebook_interface": "classic",
47+
"binderhub_url": "",
48+
"jupyterhub_url": "",
49+
"thebe": True,
50+
"colab_url": "",
51+
"deepnote_url": "",
52+
},
53+
"path_to_docs": "docs",
54+
"repository_url": "https://github.com/ComputationalPhysiology/ap_features",
55+
"repository_branch": "main",
56+
"extra_footer": "",
57+
"home_page_in_toc": True,
58+
"announcement": "",
59+
"analytics": {
60+
"google_analytics_id": "",
61+
"plausible_analytics_domain": "",
62+
"plausible_analytics_url": "https://plausible.io/js/script.js",
63+
},
64+
"use_repository_button": True,
65+
"use_edit_page_button": False,
66+
"use_issues_button": True,
67+
}
68+
html_title = "Action potential features"
69+
latex_engine = "pdflatex"
70+
myst_enable_extensions = ["amsmath", "dollarmath", "linkify"]
71+
myst_url_schemes = ["mailto", "http", "https"]
72+
nb_execution_allow_errors = False
73+
nb_execution_cache_path = ""
74+
nb_execution_excludepatterns: list[str] = []
75+
nb_execution_in_temp = False
76+
nb_execution_mode = "cache"
77+
nb_execution_timeout = 30
78+
nb_output_stderr = "show"
79+
numfig = True
80+
pygments_style = "sphinx"
81+
suppress_warnings = ["myst.domains"]
82+
use_jupyterbook_latex = True
83+
use_multitoc_numbering = True

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ pypi = [
4949
"build"
5050
]
5151
docs = [
52-
"jupyter-book",
52+
"jupyter-book<2.0",
53+
"sphinx",
54+
"sphinx-togglebutton",
55+
"myst-nb",
56+
"sphinx-copybutton",
57+
"sphinx-comments",
58+
"sphinx-external-toc",
59+
"sphinx-thebe",
5360
"ap_features[plot]",
5461
]
5562
test = [

0 commit comments

Comments
 (0)