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 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/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 diff --git a/site/contributing.md b/content/contributing.md similarity index 100% rename from site/contributing.md rename to content/contributing.md diff --git a/site/index.md b/content/index.md similarity index 100% rename from site/index.md rename to content/index.md 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 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/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 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