diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 093cedc..c80c178 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -12,7 +12,7 @@ jobs: build: runs-on: ubuntu-22.04 env: - PUBLISH_DIR: ./_build/html + PUBLISH_DIR: ./_build steps: @@ -22,13 +22,13 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 with: - python-version: "3.10" + python-version: "3.12" - name: Install dependencies run: python3 -m pip install ".[docs]" - name: Build docs - run: jupyter-book build -W --keep-going . + run: python3 -m sphinx -b html . ${{ env.PUBLISH_DIR }} - name: Upload artifact uses: actions/upload-pages-artifact@v4 diff --git a/_config.yml b/_config.yml deleted file mode 100644 index f101d6f..0000000 --- a/_config.yml +++ /dev/null @@ -1,52 +0,0 @@ -# Book settings -# Learn more at https://jupyterbook.org/customize/config.html - -title: Action potential features -author: Henrik Finsberg og Kristian Hustad -logo: docs/logo.png -copyright: "2023" -only_build_toc_files: true - -# Force re-execution of notebooks on each build. -# See https://jupyterbook.org/content/execute.html -execute: - execute_notebooks: cache - -# Define the name of the latex output file for PDF builds -latex: - latex_documents: - targetname: book.tex - -launch_buttons: - thebe: true - -# Information about where the book exists on the web -repository: - url: https://github.com/ComputationalPhysiology/ap_features # Online location of your book - path_to_book: docs # Optional path to your book, relative to the repository root - branch: main # Which branch of the repository should be used when creating links (optional) - -# Add GitHub buttons to your book -# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository -html: - use_issues_button: true - use_repository_button: true - extra_navbar: Computational Physiology at Simula - -sphinx: - config: - html_last_updated_fmt: "%b %d, %Y" - - extra_extensions: - - "sphinx.ext.autodoc" - - "sphinx.ext.napoleon" - - "sphinx.ext.viewcode" - -parse: - myst_enable_extensions: - - amsmath - - dollarmath - - linkify - - -exclude_patterns: [".pytest_cache/*", ".github/*"] diff --git a/conf.py b/conf.py new file mode 100644 index 0000000..b23b91f --- /dev/null +++ b/conf.py @@ -0,0 +1,83 @@ +############################################################################### +# Auto-generated by `jupyter-book config` +# If you wish to continue using _config.yml, make edits to that file and +# re-generate this one. +############################################################################### +author = "Henrik Finsberg og Kristian Hustad" +comments_config = {"hypothesis": False, "utterances": False} +copyright = "2025" +exclude_patterns = [ + "**.ipynb_checkpoints", + ".DS_Store", + ".github/*", + ".pytest_cache/*", + "Thumbs.db", + "_build", + "**.jupyter_cache", +] +extensions = [ + "sphinx_togglebutton", + "sphinx_copybutton", + "myst_nb", + "jupyter_book", + "sphinx_thebe", + "sphinx_comments", + "sphinx_external_toc", + "sphinx.ext.intersphinx", + "sphinx_design", + "sphinx_book_theme", + "sphinx.ext.autodoc", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinx_jupyterbook_latex", + "sphinx_multitoc_numbering", +] +external_toc_exclude_missing = True +external_toc_path = "_toc.yml" +html_baseurl = "" +html_favicon = "" +html_last_updated_fmt = "%b %d, %Y" +html_logo = "docs/logo.png" +html_sourcelink_suffix = "" +html_theme = "sphinx_book_theme" +html_theme_options = { + "search_bar_text": "Search this book...", + "launch_buttons": { + "notebook_interface": "classic", + "binderhub_url": "", + "jupyterhub_url": "", + "thebe": True, + "colab_url": "", + "deepnote_url": "", + }, + "path_to_docs": "docs", + "repository_url": "https://github.com/ComputationalPhysiology/ap_features", + "repository_branch": "main", + "extra_footer": "", + "home_page_in_toc": True, + "announcement": "", + "analytics": { + "google_analytics_id": "", + "plausible_analytics_domain": "", + "plausible_analytics_url": "https://plausible.io/js/script.js", + }, + "use_repository_button": True, + "use_edit_page_button": False, + "use_issues_button": True, +} +html_title = "Action potential features" +latex_engine = "pdflatex" +myst_enable_extensions = ["amsmath", "dollarmath", "linkify"] +myst_url_schemes = ["mailto", "http", "https"] +nb_execution_allow_errors = False +nb_execution_cache_path = "" +nb_execution_excludepatterns: list[str] = [] +nb_execution_in_temp = False +nb_execution_mode = "cache" +nb_execution_timeout = 30 +nb_output_stderr = "show" +numfig = True +pygments_style = "sphinx" +suppress_warnings = ["myst.domains"] +use_jupyterbook_latex = True +use_multitoc_numbering = True diff --git a/pyproject.toml b/pyproject.toml index c39c642..89443c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,14 @@ pypi = [ "build" ] docs = [ - "jupyter-book", + "jupyter-book<2.0", + "sphinx", + "sphinx-togglebutton", + "myst-nb", + "sphinx-copybutton", + "sphinx-comments", + "sphinx-external-toc", + "sphinx-thebe", "ap_features[plot]", ] test = [