From d4d55c2b0d145637a42d1f03cc25aa43f9039b8e Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:18:17 -0800 Subject: [PATCH 1/7] Mv index from site -> content. --- {site => content}/index.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {site => content}/index.md (100%) diff --git a/site/index.md b/content/index.md similarity index 100% rename from site/index.md rename to content/index.md From b2abe61eb8c2caa94eec9c27a681ac1f98ec9d95 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:18:45 -0800 Subject: [PATCH 2/7] Mv contributing from site -> content --- {site => content}/contributing.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {site => content}/contributing.md (100%) diff --git a/site/contributing.md b/content/contributing.md similarity index 100% rename from site/contributing.md rename to content/contributing.md From de0a09ba74cc8d25153ef7841bc917dc447f15e1 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:19:34 -0800 Subject: [PATCH 3/7] Mv _static from site to top-level dir. --- {site/_static => _static}/01-fork.gif | Bin {site/_static => _static}/02-create_new_branch.gif | Bin {site/_static => _static}/03-upload.gif | Bin {site/_static => _static}/04-add_to_readme.gif | Bin {site/_static => _static}/05-create_PR.gif | Bin {site/_static => _static}/favicon.png | Bin {site/_static => _static}/numpylogo.svg | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename {site/_static => _static}/01-fork.gif (100%) rename {site/_static => _static}/02-create_new_branch.gif (100%) rename {site/_static => _static}/03-upload.gif (100%) rename {site/_static => _static}/04-add_to_readme.gif (100%) rename {site/_static => _static}/05-create_PR.gif (100%) rename {site/_static => _static}/favicon.png (100%) rename {site/_static => _static}/numpylogo.svg (100%) diff --git a/site/_static/01-fork.gif b/_static/01-fork.gif similarity index 100% rename from site/_static/01-fork.gif rename to _static/01-fork.gif diff --git a/site/_static/02-create_new_branch.gif b/_static/02-create_new_branch.gif similarity index 100% rename from site/_static/02-create_new_branch.gif rename to _static/02-create_new_branch.gif diff --git a/site/_static/03-upload.gif b/_static/03-upload.gif similarity index 100% rename from site/_static/03-upload.gif rename to _static/03-upload.gif diff --git a/site/_static/04-add_to_readme.gif b/_static/04-add_to_readme.gif similarity index 100% rename from site/_static/04-add_to_readme.gif rename to _static/04-add_to_readme.gif diff --git a/site/_static/05-create_PR.gif b/_static/05-create_PR.gif similarity index 100% rename from site/_static/05-create_PR.gif rename to _static/05-create_PR.gif diff --git a/site/_static/favicon.png b/_static/favicon.png similarity index 100% rename from site/_static/favicon.png rename to _static/favicon.png diff --git a/site/_static/numpylogo.svg b/_static/numpylogo.svg similarity index 100% rename from site/_static/numpylogo.svg rename to _static/numpylogo.svg From c5f8ceec4e43790b585e9e1ce8040c1c1c6e16de Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:20:20 -0800 Subject: [PATCH 4/7] Update myst.yml with new locations. --- myst.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/myst.yml b/myst.yml index fa935f15..86a537d1 100644 --- a/myst.yml +++ b/myst.yml @@ -6,7 +6,7 @@ project: authors: Numpy Community github: https://github.com/numpy/numpy-tutorials toc: - - file: site/index.md + - file: content/index.md - title: Applications children: @@ -23,7 +23,7 @@ project: - file: content/save-load-arrays.md - file: content/tutorial-ma.md - title: Contributing - file: site/contributing.md + file: content/contributing.md children: - file: content/tutorial-style-guide.md @@ -31,5 +31,5 @@ project: site: template: book-theme options: - favicon: site/_static/favicon.png - logo: site/_static/numpylogo.svg + favicon: _static/favicon.png + logo: _static/numpylogo.svg From 32f1aa286c943c333c674f2bea67ba778e8d89ac Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:37:19 -0800 Subject: [PATCH 5/7] MAINT: consolidate requirements. --- CONTRIBUTING.md | 4 ++-- requirements.txt | 3 ++- tox.ini | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 13ed7d44..de0b1416 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,13 +26,13 @@ See the linked documentation for further details. ### Quickstart Set up a development environment with the dependencies listed in -`requirements.txt` and `site/requirements.txt`. +`requirements.txt`. For example, using the built-in [`venv`][venv] module: ```bash python -m venv np-tutorials source np-tutorials/bin/activate -python -m pip install -r requirements.txt -r site/requirements.txt +python -m pip install -r requirements.txt ``` [venv]: https://docs.python.org/3/library/venv.html diff --git a/requirements.txt b/requirements.txt index dd03cc89..f0684fff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,6 @@ pooch # for scipy.datasets matplotlib pandas imageio -# For supporting .md-based notebooks +# For supporting .md-based notebooks and building the site jupytext +jupyter-book>=2 diff --git a/tox.ini b/tox.ini index 8ec29880..d2c6fe9b 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,6 @@ deps = # We use these files to specify all the dependencies, and below we override # versions for specific testing schenarios -rtest_requirements.txt - -rsite/requirements.txt -rrequirements.txt oldestdeps: numpy==1.24 From 1d6b391c6ca1a7feb31e8a11f2346cc9bf813014 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:38:44 -0800 Subject: [PATCH 6/7] MAINT: update .gitignore. --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 63354e46..9108072a 100644 --- a/.gitignore +++ b/.gitignore @@ -91,9 +91,6 @@ Thumbs.db # Things specific to this project # ################################### -site/_build/* -site/notebooks/* - # Content generated during notebook execution content/mooreslaw_regression* content/tutorial-x-ray-image-processing/xray_image.gif From ba57d7b65d7bc3432a5c339f8f0611ddc79d0725 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Wed, 26 Nov 2025 14:41:30 -0800 Subject: [PATCH 7/7] MAINT: Rm site directory. --- site/_templates/layout.html | 5 --- site/conf.py | 79 ------------------------------------- site/content | 1 - site/make.bat | 35 ---------------- site/requirements.txt | 1 - 5 files changed, 121 deletions(-) delete mode 100644 site/_templates/layout.html delete mode 100644 site/conf.py delete mode 120000 site/content delete mode 100644 site/make.bat delete mode 100644 site/requirements.txt diff --git a/site/_templates/layout.html b/site/_templates/layout.html deleted file mode 100644 index c1e3d126..00000000 --- a/site/_templates/layout.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "!layout.html" %} -{% block extrahead %} - - {{ super() }} -{% endblock %} diff --git a/site/conf.py b/site/conf.py deleted file mode 100644 index 881b3ab2..00000000 --- a/site/conf.py +++ /dev/null @@ -1,79 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- Project information ----------------------------------------------------- -from datetime import date - -project = 'NumPy tutorials' -copyright = f'2020-{date.today().year}, the NumPy community' -author = 'the NumPy community' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'myst_nb', - 'sphinx_copybutton', -] - -myst_enable_extensions = [ - 'dollarmath', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build', - 'Thumbs.db', - '.DS_Store', - 'notebooks', - ] - -# MyST-NB configuration -nb_execution_timeout = 60 - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_book_theme' -html_title = 'NumPy Tutorials' -html_logo = '_static/numpylogo.svg' -html_favicon = '_static/favicon.png' -html_theme_options = { - "github_url": "https://github.com/numpy/numpy-tutorials/", - "repository_url": "https://github.com/numpy/numpy-tutorials/", - "repository_branch": "main", - "use_repository_button": True, - "use_issues_button": True, - "use_edit_page_button": False, - "path_to_docs": "site/", - "launch_buttons": { - "binderhub_url": "https://mybinder.org", -# "jupyterhub_url": "Not a URL: dummy for theme demo.", - }, -} - - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] diff --git a/site/content b/site/content deleted file mode 120000 index 67872980..00000000 --- a/site/content +++ /dev/null @@ -1 +0,0 @@ -../content/ \ No newline at end of file diff --git a/site/make.bat b/site/make.bat deleted file mode 100644 index 2119f510..00000000 --- a/site/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/site/requirements.txt b/site/requirements.txt deleted file mode 100644 index e6e749ac..00000000 --- a/site/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -jupyter-book>=2