From 0335fff9ff3b54acd79826896d710352e0cc25ad Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 12 May 2025 10:17:55 -0700 Subject: [PATCH 1/4] Add Makefile, standard sphinx workflow. --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/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) From eacd103fafa1502508a67d20243ad4face054472 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 12 May 2025 10:18:18 -0700 Subject: [PATCH 2/4] Ignore build products for execution. --- docs/conf.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/conf.py diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..df5fd5c --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,15 @@ +extensions = ["myst_nb", "sphinx_copybutton"] + +exclude_patterns = ["_build"] + +html_theme = 'sphinx_book_theme' +html_title = 'Executable Tutorials' +html_theme_options = { + "repository_url": "https://github.com/scientific-python/executable-tutorials", + "path_to_docs": "docs", + "repository_branch": "main", + "use_repository_button": True, + "use_issues_button": True, + "use_edit_page_button": True, +} +nb_execution_mode = "auto" From 1bd5dd5e6f7f03d88625d5cfe70030ed7a9a19b2 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 12 May 2025 10:22:36 -0700 Subject: [PATCH 3/4] Add basic requirements file. --- requirements.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..df354a5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +# For site +sphinx +myst-nb +sphinx-book-theme +ipympl +sphinx-copybutton +# For tutorials +matplotlib From f76f0e178d51425b740d914c182985b167f331e5 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Mon, 12 May 2025 11:48:21 -0700 Subject: [PATCH 4/4] MAINT: minor touchups. --- .gitignore | 2 +- docs/conf.py | 15 --------------- index.md | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 docs/conf.py diff --git a/.gitignore b/.gitignore index ccb36fd..52454fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/build/* +_build/* .ipynb_checkpoints /.pixi/* diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index df5fd5c..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,15 +0,0 @@ -extensions = ["myst_nb", "sphinx_copybutton"] - -exclude_patterns = ["_build"] - -html_theme = 'sphinx_book_theme' -html_title = 'Executable Tutorials' -html_theme_options = { - "repository_url": "https://github.com/scientific-python/executable-tutorials", - "path_to_docs": "docs", - "repository_branch": "main", - "use_repository_button": True, - "use_issues_button": True, - "use_edit_page_button": True, -} -nb_execution_mode = "auto" diff --git a/index.md b/index.md index 97bd833..18eff3f 100644 --- a/index.md +++ b/index.md @@ -3,6 +3,6 @@ ```{toctree} :maxdepth: 1 :glob: -recipes/**/* +tutorials/**/* contributing ```