From 8cd5ae8e9453bbb157a2d2c8848c1c2d266c3a00 Mon Sep 17 00:00:00 2001 From: Nengo Bones Date: Wed, 19 Aug 2020 02:04:02 +0000 Subject: [PATCH 1/8] Automatic update to Nengo Bones e14fa35 e14fa35 - Enable new pip dependency resolver cede948 - Officially support Python 3.8 7c8be1b - Avoid Sphinx 3.1.0 version --- .travis.yml | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b9fe1f8..9f36694 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,7 @@ env: - SCRIPT="test" - TEST_ARGS="" - BRANCH_NAME="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" + - PIP_USE_FEATURE="2020-resolver" jobs: include: diff --git a/pyproject.toml b/pyproject.toml index 2410bfa..c7f5d32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,4 @@ requires = ["setuptools", "wheel"] [tool.black] -target-version = ['py35', 'py36', 'py37'] +target-version = ['py35', 'py36', 'py37', 'py38'] From 0e47594f312f61dc000406c20cb9059b522f0b99 Mon Sep 17 00:00:00 2001 From: Eric Hunsberger Date: Wed, 19 Aug 2020 16:33:36 -0300 Subject: [PATCH 2/8] Remove spaces from Nengo project names Also fix NengoOCL/NengoMPI URL to not need redirect. --- nengo_sphinx_theme/theme/navbar.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nengo_sphinx_theme/theme/navbar.html b/nengo_sphinx_theme/theme/navbar.html index 0b3c274..bebbaa3 100644 --- a/nengo_sphinx_theme/theme/navbar.html +++ b/nengo_sphinx_theme/theme/navbar.html @@ -1,17 +1,17 @@ {% set projects = [ - ("Nengo Core", "https://www.nengo.ai/nengo/"), - ("Nengo GUI", "https://github.com/nengo/nengo-gui/"), - ("Nengo DL", "https://www.nengo.ai/nengo-dl/"), + ("Nengo core", "https://www.nengo.ai/nengo/"), + ("NengoGUI", "https://github.com/nengo/nengo-gui/"), + ("NengoDL", "https://www.nengo.ai/nengo-dl/"), ("divider", None), - ("Nengo SPA", "https://www.nengo.ai/nengo-spa/"), - ("Nengo Extras", "https://www.nengo.ai/nengo-extras/"), + ("NengoSPA", "https://www.nengo.ai/nengo-spa/"), + ("NengoExtras", "https://www.nengo.ai/nengo-extras/"), ("Nengolib", "https://arvoelke.github.io/nengolib-docs/"), ("divider", None), - ("Nengo FPGA", "https://www.nengo.ai/nengo-fpga/"), - ("Nengo Loihi", "https://www.nengo.ai/nengo-loihi/"), - ("Nengo OpenCL", "https://github.com/nengo/nengo-ocl"), - ("Nengo SpiNNaker", "https://github.com/project-rig/nengo_spinnaker"), - ("Nengo MPI", "https://github.com/nengo/nengo-mpi"), + ("NengoFPGA", "https://www.nengo.ai/nengo-fpga/"), + ("NengoLoihi", "https://www.nengo.ai/nengo-loihi/"), + ("NengoOCL", "https://github.com/nengo-labs/nengo-ocl"), + ("NengoSpiNNaker", "https://github.com/project-rig/nengo_spinnaker"), + ("NengoMPI", "https://github.com/nengo-labs/nengo-mpi"), ] %}
From f47ad69345e5ea8dff2027c7ad95ee507f3535d6 Mon Sep 17 00:00:00 2001 From: Eric Hunsberger Date: Wed, 19 Aug 2020 16:58:36 -0300 Subject: [PATCH 3/8] Add KerasSpiking/PyTorchSpiking to navbar --- nengo_sphinx_theme/theme/navbar.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nengo_sphinx_theme/theme/navbar.html b/nengo_sphinx_theme/theme/navbar.html index bebbaa3..468b2a0 100644 --- a/nengo_sphinx_theme/theme/navbar.html +++ b/nengo_sphinx_theme/theme/navbar.html @@ -12,6 +12,9 @@ ("NengoOCL", "https://github.com/nengo-labs/nengo-ocl"), ("NengoSpiNNaker", "https://github.com/project-rig/nengo_spinnaker"), ("NengoMPI", "https://github.com/nengo-labs/nengo-mpi"), + ("divider", None), + ("KerasSpiking", "https://www.nengo.ai/keras-spiking"), + ("PyTorchSpiking", "https://www.nengo.ai/pytorch-spiking"), ] %}
From d3db3493f2ba6be8f31f0d4cce4e11a2186c350f Mon Sep 17 00:00:00 2001 From: WAEliasmith Date: Thu, 20 Aug 2020 17:53:31 -0300 Subject: [PATCH 4/8] Added development warning to sphinx docs Added a warning at the top of the screen when accessing the current master version. This warning is clickable to bring the user to the latest released version. --- nengo_sphinx_theme/theme/layout.html | 3 +++ nengo_sphinx_theme/theme/unstable_warning.html | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 nengo_sphinx_theme/theme/unstable_warning.html diff --git a/nengo_sphinx_theme/theme/layout.html b/nengo_sphinx_theme/theme/layout.html index f9a95d3..50b8f61 100644 --- a/nengo_sphinx_theme/theme/layout.html +++ b/nengo_sphinx_theme/theme/layout.html @@ -69,6 +69,9 @@
+ {% if building_version == "latest" %} + {%- include "unstable_warning.html" %} + {% endif %} {% block body %} {% endblock %}
diff --git a/nengo_sphinx_theme/theme/unstable_warning.html b/nengo_sphinx_theme/theme/unstable_warning.html new file mode 100644 index 0000000..a7827d8 --- /dev/null +++ b/nengo_sphinx_theme/theme/unstable_warning.html @@ -0,0 +1,13 @@ +
+ \ No newline at end of file From fc6ac1adeadd11606b9aa8acec5e1380e9cdd290 Mon Sep 17 00:00:00 2001 From: Daniel Rasmussen Date: Tue, 25 Aug 2020 15:56:07 -0300 Subject: [PATCH 5/8] fixup! Added development warning to sphinx docs --- nengo_sphinx_theme/theme/layout.html | 20 ++++++++++++++++--- .../theme/unstable_warning.html | 13 ------------ 2 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 nengo_sphinx_theme/theme/unstable_warning.html diff --git a/nengo_sphinx_theme/theme/layout.html b/nengo_sphinx_theme/theme/layout.html index 50b8f61..4e776db 100644 --- a/nengo_sphinx_theme/theme/layout.html +++ b/nengo_sphinx_theme/theme/layout.html @@ -69,9 +69,23 @@
- {% if building_version == "latest" %} - {%- include "unstable_warning.html" %} - {% endif %} + {% if building_version == "latest" %} + {% set prefix = pagename + | list + | select("equalto", "/") + | map("replace", "/", "../") + | join("") %} + {% set stable = releases.split(",")[0] %} +
+

Note

+

+ This documentation is for a development version. + + Click here for the latest stable release ({{ stable }}). + +

+
+ {% endif %} {% block body %} {% endblock %}
diff --git a/nengo_sphinx_theme/theme/unstable_warning.html b/nengo_sphinx_theme/theme/unstable_warning.html deleted file mode 100644 index a7827d8..0000000 --- a/nengo_sphinx_theme/theme/unstable_warning.html +++ /dev/null @@ -1,13 +0,0 @@ -
- \ No newline at end of file From 2ca2ddd877f3829213bdb656216c40ec876d52f2 Mon Sep 17 00:00:00 2001 From: Daniel Rasmussen Date: Tue, 25 Aug 2020 16:32:41 -0300 Subject: [PATCH 6/8] fixup! Added development warning to sphinx docs --- nengo_sphinx_theme/theme/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nengo_sphinx_theme/theme/layout.html b/nengo_sphinx_theme/theme/layout.html index 4e776db..a885155 100644 --- a/nengo_sphinx_theme/theme/layout.html +++ b/nengo_sphinx_theme/theme/layout.html @@ -69,13 +69,13 @@
- {% if building_version == "latest" %} + {% if building_version == "latest" and releases %} {% set prefix = pagename | list | select("equalto", "/") | map("replace", "/", "../") | join("") %} - {% set stable = releases.split(",")[0] %} + {% set stable = releases | sort_versions | first %}

Note

From 891f5bd04c8edbbb2e7b99b98fe4bed733f6986b Mon Sep 17 00:00:00 2001 From: Daniel Rasmussen Date: Tue, 25 Aug 2020 16:42:42 -0300 Subject: [PATCH 7/8] Consolidate version root-finding logic --- nengo_sphinx_theme/__init__.py | 4 ++++ nengo_sphinx_theme/theme/layout.html | 7 +------ nengo_sphinx_theme/theme/sidebar.html | 6 +----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/nengo_sphinx_theme/__init__.py b/nengo_sphinx_theme/__init__.py index 8460829..5fb8496 100644 --- a/nengo_sphinx_theme/__init__.py +++ b/nengo_sphinx_theme/__init__.py @@ -64,7 +64,11 @@ def sort_versions(releases): releases.sort(key=parse_version, reverse=True) return releases + def to_root(pagename): + return "../" * pagename.count("/") + if app.builder.format == "html": app.builder.templates.environment.filters["sort_versions"] = sort_versions + app.builder.templates.environment.filters["to_root"] = to_root app.connect("builder-inited", add_jinja_filters) diff --git a/nengo_sphinx_theme/theme/layout.html b/nengo_sphinx_theme/theme/layout.html index a885155..5c9244c 100644 --- a/nengo_sphinx_theme/theme/layout.html +++ b/nengo_sphinx_theme/theme/layout.html @@ -70,17 +70,12 @@

{% if building_version == "latest" and releases %} - {% set prefix = pagename - | list - | select("equalto", "/") - | map("replace", "/", "../") - | join("") %} {% set stable = releases | sort_versions | first %}

Note

This documentation is for a development version. - + Click here for the latest stable release ({{ stable }}).

diff --git a/nengo_sphinx_theme/theme/sidebar.html b/nengo_sphinx_theme/theme/sidebar.html index 91b91aa..1b3deff 100644 --- a/nengo_sphinx_theme/theme/sidebar.html +++ b/nengo_sphinx_theme/theme/sidebar.html @@ -30,11 +30,7 @@