From 29166744bad18d1251a5584d5a68cda206ac63f2 Mon Sep 17 00:00:00 2001
From: Brent Huisman <brenthuisman@users.noreply.github.com>
Date: Thu, 5 Jan 2023 13:27:16 +0100
Subject: [PATCH] v0.8.1 postrelease (#2074)

---
 .github/workflows/test-everything.yml    | 35 ++++++++++++++++++++++--
 CHANGELOG.md                             | 21 ++++++++++++--
 CITATION.bib                             | 13 +++++----
 VERSION                                  |  2 +-
 doc/concepts/domdec.rst                  |  6 ----
 doc/dev/cable_cell.rst                   |  2 +-
 doc/ecosystem/index.rst                  |  4 +--
 doc/index.rst                            | 10 +++++--
 doc/install/python.rst                   |  4 +--
 doc/scripts/divio_docs_theme/layout.html |  2 +-
 doc/tutorial/probe_lfpykit.rst           | 16 +++++------
 doc/tutorial/single_cell_allen.rst       |  2 +-
 scripts/check-all-tags.sh                |  4 +--
 spack/package.py                         |  7 ++++-
 14 files changed, 91 insertions(+), 37 deletions(-)

diff --git a/.github/workflows/test-everything.yml b/.github/workflows/test-everything.yml
index b776bd9d..59ae3c2c 100644
--- a/.github/workflows/test-everything.yml
+++ b/.github/workflows/test-everything.yml
@@ -152,7 +152,7 @@ jobs:
           mkdir build
           cd build
           cmake .. -GNinja -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_PYTHON=ON -DARB_VECTORIZE=${{ matrix.config.simd }} -DPython3_EXECUTABLE=`which python` -DARB_WITH_MPI=${{ matrix.config.mpi }} -DARB_USE_BUNDLED_LIBS=ON -DARB_WITH_ASSERTIONS=ON
-          ninja -j4 tests examples pyarb html
+          ninja -j4 tests examples pyarb
           cd -
       - if:   ${{ matrix.variant == 'shared' }}
         name: Build arbor
@@ -161,7 +161,7 @@ jobs:
           mkdir build
           cd build
           cmake .. -GNinja -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_PYTHON=ON -DARB_VECTORIZE=${{ matrix.config.simd }} -DPython3_EXECUTABLE=`which python` -DARB_WITH_MPI=${{ matrix.config.mpi }} -DARB_USE_BUNDLED_LIBS=ON -DARB_WITH_ASSERTIONS=ON -DBUILD_SHARED_LIBS=ON
-          ninja -j4 tests examples pyarb html
+          ninja -j4 tests examples pyarb
           cd -
       - name: Install arbor
         run: |
@@ -224,3 +224,34 @@ jobs:
         run: python -m unittest discover -v -s python
       - name: Run Python examples
         run: scripts/run_python_examples.sh
+  testdocs:
+    name: "Docs build test"
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-20.04]
+        python-version: [3.7]
+    steps:
+      - name: Set up cmake
+        uses: jwlawson/actions-setup-cmake@v1.13
+        with:
+          cmake-version: ${{ matrix.config.cmake }}
+      - name: Set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python-version }}
+      - name: Update pip
+        run: python -m pip install --upgrade pip
+      - name: Clone w/ submodules
+        uses: actions/checkout@v3
+        with:
+          submodules: recursive
+      - name: Install Python packages
+        run: python3 -m pip install -r doc/requirements.txt -U
+      - name: Build Arbor Docs
+        run: |
+          mkdir build
+          cd build
+          cmake .. -DARB_WITH_PYTHON=ON -DPython3_EXECUTABLE=`which python` -DARB_USE_BUNDLED_LIBS=ON
+          make html
+        
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55405a5e..a65dad81 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,6 @@
 # v0.8.1
 
-** 2022 12 20 **
+** 2022 12 22 **
 
 A 🎄 holiday release! Not much has changed in a month, but we'd like to share it all the same. Notably, the [Arbor GUI](https://github.com/arbor-sim/gui/) [is co-released](https://github.com/arbor-sim/gui/releases/tag/v0.8) as of Arbor v0.8, and v0.8.1 will be no different.
 
@@ -22,7 +22,24 @@ A 🎄 holiday release! Not much has changed in a month, but we'd like to share
 
 ## Full commit log
 
-...
+* Post release: add Zenodo entry, add Spack entry, update docs and scripts by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2036
+* BUGFIX: add ARB_CUDA flag to example catalogue by @boeschf in https://github.com/arbor-sim/arbor/pull/2039
+* Additional builtin functions to Arbor's NMODL dialect by @boeschf in https://github.com/arbor-sim/arbor/pull/2035
+* Throw better errors when we cannot look up ion diffusivity by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2040
+* âš¡ Voltage Processes by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2033
+* simplify make catalogue by @boeschf in https://github.com/arbor-sim/arbor/pull/2042
+* spack gpu option by @boeschf in https://github.com/arbor-sim/arbor/pull/2043
+* Remove deprecated spike_detector. by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2041
+* make ARB_MODCC functional again by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2029
+* Yank v0.5 from Spack file, it does not build due to change in setting arch by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2037
+* Use pugixml instead of libxml2 by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2048
+* [BUGFIX] a-b-c: actually set compiler, improved default by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2051
+* Sde Tutorial by @boeschf in https://github.com/arbor-sim/arbor/pull/2044
+* Set Python to known version for all CI workflows by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2058
+* consistent mechanism ids by @boeschf in https://github.com/arbor-sim/arbor/pull/2057
+* Fix docs about exprelr. by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2064
+* Allow __ in profiler names. by @thorstenhater in https://github.com/arbor-sim/arbor/pull/2065
+* CI fixes for wheel building, prep for musllinux, Spack by @brenthuisman in https://github.com/arbor-sim/arbor/pull/2069
 
 # v0.8
 
diff --git a/CITATION.bib b/CITATION.bib
index eaadd293..e2718882 100644
--- a/CITATION.bib
+++ b/CITATION.bib
@@ -8,7 +8,7 @@
     doi={10.1109/EMPDP.2019.8671560},
     ISSN={2377-5750}}
     
-@software{nora_abi_akar_2022_7323982,
+@software{nora_abi_akar_2022_7473671,
   author       = {Nora Abi Akar and
                   John Biddiscombe and
                   Benjamin Cumming and
@@ -30,12 +30,13 @@
                   Fabian Bösch and
                   Jannik Luboeinski and
                   Simon Frasch and
-                  Lukas Drescher},
-  title        = {Arbor Library v0.8},
+                  Lukas Drescher and
+                  Lennart Landsmeer},
+  title        = {Arbor Library v0.8.1},
   month        = nov,
   year         = 2022,
   publisher    = {Zenodo},
   version      = {v0.8},
-  doi          = {10.5281/zenodo.7323982},
-  url          = {https://doi.org/10.5281/zenodo.7323982}
-}
+  doi          = {10.5281/zenodo.7473671},
+  url          = {https://doi.org/10.5281/zenodo.7473671}
+}
\ No newline at end of file
diff --git a/VERSION b/VERSION
index 6f4eebdf..b1e9d951 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.8.1
+0.8.2-dev
diff --git a/doc/concepts/domdec.rst b/doc/concepts/domdec.rst
index bc9ea903..ee4513ac 100644
--- a/doc/concepts/domdec.rst
+++ b/doc/concepts/domdec.rst
@@ -34,12 +34,6 @@ We define some terms as used in the context of connectivity
 
 .. glossary::
 
-   connection
-      Tuple of ``(source, target, weight, delay)`` describing an
-      axon/synapse connection as travelling time (`delay`) and attenuation
-      (`weight`) between two sites `source = (gid, threshold_detector)` and `target
-      = (gid, synapse)` where `threshold_detector` and `synapse` are string labels.
-
    cell_group
       List of same-kinded cells that share some information. Must not be split
       across domains.
diff --git a/doc/dev/cable_cell.rst b/doc/dev/cable_cell.rst
index 945b5078..84b397ad 100644
--- a/doc/dev/cable_cell.rst
+++ b/doc/dev/cable_cell.rst
@@ -80,7 +80,7 @@ Discretisation splits the segments described by the morphology into *control
 volumes* (CV; sometimes called *compartments*) according to a ``cv_policy``.
 This allows us to construct a system of linear equations, the Hines matrix, to
 describe the evolution of the CV voltages according to the cable equation. Refer
-to :ref:`Discretisation <discretisation>` and :ref:`Cable equation
+to :ref:`Discretisation <morph-cv-policies>` and :ref:`Cable equation
 <cable_equation>`.
 
 Backend-dependent data is stored in ``shared_state`` as per-compartment data and
diff --git a/doc/ecosystem/index.rst b/doc/ecosystem/index.rst
index 2ad07ee4..1494cca5 100644
--- a/doc/ecosystem/index.rst
+++ b/doc/ecosystem/index.rst
@@ -25,10 +25,10 @@ NSuite
     A framework for maintaining and running benchmarks and validation tests for multi-compartment neural network simulations on HPC systems. `NSuite documentation <https://nsuite.readthedocs.io>`_
 
 Arbor GUI
-    The Arbor GUI visualizes cable cells and can be used to decorate morphologies. Single cell simulations can be ran (using the Arbor simulator) and output plotted right from the GUI. `Code repository and Readme <https://github.com/arbor-sim/gui>`_
+    The Arbor GUI visualizes cable cells and can be used to decorate morphologies. Single cell simulations can be ran (using the Arbor simulator) and output plotted right from the GUI. `Arbor GUI code repository and readme <https://github.com/arbor-sim/gui>`_
 
 nmlcc
-    Arbor has built-in read support for NeuroML morphologies, but not yet for other NeuroML components (mechanisms, networks). `nmlcc` is compiler/translator that aims to generate complete Arbor inputs for any NeuroML file. `Code repository and Readme <https://github.com/thorstenhater/nmlcc/>`_
+    Arbor has built-in read support for NeuroML morphologies, but not yet for other NeuroML components (mechanisms, networks). `nmlcc` is compiler/translator that aims to generate complete Arbor inputs for any NeuroML file. `nmlcc code repository and readme <https://github.com/thorstenhater/nmlcc/>`_
 
 .. figure:: arbor.png
    :align: center
diff --git a/doc/index.rst b/doc/index.rst
index 0bcbffbe..f375b97a 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -6,8 +6,8 @@ Arbor
 .. |ci| image:: https://github.com/arbor-sim/arbor/actions/workflows/test-everything.yml/badge.svg
     :target: https://github.com/arbor-sim/arbor/actions/workflows/test-everything.yml
 
-.. |pythonwheels| image:: https://github.com/arbor-sim/arbor/actions/workflows/ciwheel.yml/badge.svg
-    :target: https://github.com/arbor-sim/arbor/actions/workflows/ciwheel.yml
+.. |pythonwheels| image:: https://github.com/arbor-sim/arbor/actions/workflows/release.yml/badge.svg
+    :target: https://github.com/arbor-sim/arbor/actions/workflows/release.yml
 
 .. |gitter| image:: https://badges.gitter.im/arbor-sim/community.svg
     :target: https://gitter.im/arbor-sim/community
@@ -45,6 +45,9 @@ The Arbor software can be cited by version via Zenodo or via Arbors introductory
 Latest version
     |zlatest|
 
+Version 0.8.1
+    |z081|
+
 Version 0.8
     |z08|
 
@@ -80,6 +83,9 @@ Cite (Bibtex format)
 .. |zlatest| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1459678.svg
     :target: https://doi.org/10.5281/zenodo.1459678
 
+.. |z081| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7473671.svg
+    :target: https://doi.org/10.5281/zenodo.7473671
+    
 .. |z08| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7323982.svg
     :target: https://doi.org/10.5281/zenodo.7323982
     
diff --git a/doc/install/python.rst b/doc/install/python.rst
index 2f18d59d..ef223b97 100644
--- a/doc/install/python.rst
+++ b/doc/install/python.rst
@@ -44,7 +44,7 @@ You are now ready to use Arbor! You can continue reading these documentation pag
 
     * Ubuntu/Debian: ``git cmake gcc python3-dev python3-pip``
     * Fedora/CentOS/OpenSuse: ``git cmake gcc-c++ python3-devel python3-pip``
-    * MacOS: get ``brew`` `here <https://brew.sh>`_ and run ``brew install cmake clang python3``
+    * MacOS: get ``brew`` `at brew.sh <https://brew.sh>`_ and run ``brew install cmake clang python3``
     * Windows: the simplest way is to use `WSL <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_ and then follow the instructions for Ubuntu.
 
 .. _in_python_custom:
@@ -100,7 +100,7 @@ The following flags can be used to configure the installation:
   documented below, may also have to be set appropriately to generated
   vectorized code. See :ref:`install-architecture` for details.
 * ``ARB_ARCH=<native|*>``: CPU micro-architecture to target. The advised
-  default is ``native``. See `here
+  default is ``native``. See `the GNU GCC documentation
   <https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html>`_ for a full list of
   options.
 
diff --git a/doc/scripts/divio_docs_theme/layout.html b/doc/scripts/divio_docs_theme/layout.html
index f13c2c15..d6cee785 100755
--- a/doc/scripts/divio_docs_theme/layout.html
+++ b/doc/scripts/divio_docs_theme/layout.html
@@ -131,7 +131,7 @@
         <div class="header-title-wrap">
             <a class="header-title" href="{{ pathto(master_doc) }}">{{ project }}</a>{% if READTHEDOCS %} v: {{ current_version }}{% endif %}
         </div>
-        <a class="logo-link" target="_blank" href="{{ pathto(master_doc) }}"><img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ project }}"/></a>
+        <a class="logo-link" target="_blank" href="{{ pathto(master_doc) }}"><img src="{{ pathto(logo_url,1) }}" class="logo" alt="{{ project }}"/></a>
     </div>
 
           {% include "breadcrumbs.html" %}
diff --git a/doc/tutorial/probe_lfpykit.rst b/doc/tutorial/probe_lfpykit.rst
index 3faa6e86..5d257100 100644
--- a/doc/tutorial/probe_lfpykit.rst
+++ b/doc/tutorial/probe_lfpykit.rst
@@ -125,20 +125,20 @@ and returns the corresponding :class:`~arbor.place_pwlin` and :class:`~arbor.cab
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 72-116
+   :lines: 72-114
 
 Store the function output:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 119-120
+   :lines: 117-118
 
 Next, we instantiate :class:`Recipe`, and execute the model for a few hundred ms,
 sampling the different signals every 1 ms:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 122-135
+   :lines: 120-133
 
 Extract recorded membrane voltages, electrode and transmembrane currents.
 Note that membrane voltages at branch points and intersections between CVs are dropped as
@@ -146,14 +146,14 @@ we only illustrate membrane voltages of segments with finite lengths.
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 137-152
+   :lines: 135-150
 
 Finally we sum the stimulation and transmembrane currents, allowing the stimuli to mimic a synapse
 current embedded in the membrane itself rather than an intracellular electrode current:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 154-160
+   :lines: 152-158
 
 .. _tutorial_lfpykit-lfpykit:
 
@@ -171,21 +171,21 @@ Starting with a class inherited from :class:`lfpykit.CellGeometry`:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 170-202
+   :lines: 168-200
 
 Then, a class inherited from :class:`lfpykit.LineSourcePotential`.
 Other use cases may inherit from any other parent class defined in :mod:`lfpykit.models` in a similar manner:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 205-253
+   :lines: 202-251
 
 With these two classes one may then compute extracellular potentials from transmembrane
 currents in space with a few lines of code:
 
 .. literalinclude:: ../../python/example/probe_lfpykit.py
    :language: python
-   :lines: 256-278
+   :lines: 254-276
 
 .. _tutorial_lfpykit-illustration:
 
diff --git a/doc/tutorial/single_cell_allen.rst b/doc/tutorial/single_cell_allen.rst
index 292e2afc..b1fae81f 100644
--- a/doc/tutorial/single_cell_allen.rst
+++ b/doc/tutorial/single_cell_allen.rst
@@ -154,7 +154,7 @@ Then, we extract Arbor's output, accessible after the simulation ran at
   The careful observer notices that this trace does not match the experimental data shown on the Allen website
   (or in the ``488683423.nwb`` file). Sweep 35 clearly has 5 spikes, not 4. That is because in the Allen SDK,
   the axon in the ``swc`` file is replaced with a stub, see
-  `here <https://www.biorxiv.org/content/10.1101/2020.04.09.030239v1.full>`_ and `here <https://github.com/AllenInstitute/AllenSDK/issues/1683>`_.
+  `this paper <https://www.biorxiv.org/content/10.1101/2020.04.09.030239v1.full>`_ and `this AllenSDK Issue <https://github.com/AllenInstitute/AllenSDK/issues/1683>`_.
   However, that adapted morphology is not exportable back to a modified ``swc`` file. When we tried to mimic
   the procedure, we did not obtain the experimental trace.
 
diff --git a/scripts/check-all-tags.sh b/scripts/check-all-tags.sh
index dbb09070..57e9553a 100755
--- a/scripts/check-all-tags.sh
+++ b/scripts/check-all-tags.sh
@@ -13,7 +13,7 @@ PREFIX="${1:-} `pwd`/build/bin"
 cxx=/usr/local/opt/llvm/bin/clang++
 cc=/usr/local/opt/llvm/bin/clang
 
-for tag in v0.4 v0.5.2 v0.6 v0.7 v0.8
+for tag in v0.4 v0.5.2 v0.6 v0.7 v0.8 v0.8.1
 do
     echo "Version=$tag"
     rm -rf ext/*
@@ -54,7 +54,7 @@ check () {
     fi
 }
 
-for tag in "v0.4-79855b66" "v0.5.2-51e35898" "v0.6-930c23eb" "v0.7-d0e424b4" "v0.8-8e82ec1"
+for tag in "v0.4-79855b66" "v0.5.2-51e35898" "v0.6-930c23eb" "v0.7-d0e424b4" "v0.8-8e82ec1" "v0.8.1-c683a1f"
 do
     echo "Version=$tag"
     for simd in ON OFF
diff --git a/spack/package.py b/spack/package.py
index 2cf73839..34a30425 100644
--- a/spack/package.py
+++ b/spack/package.py
@@ -12,10 +12,15 @@ class Arbor(CMakePackage, CudaPackage):
 
     homepage = "https://arbor-sim.org"
     git = "https://github.com/arbor-sim/arbor.git"
-    url = "https://github.com/arbor-sim/arbor/releases/download/v0.8/arbor-v0.8-full.tar.gz"
+    url = "https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz"
     maintainers = ["bcumming", "brenthuisman", "haampie", "schmitts"]
 
     version("master", branch="master", submodules=True)
+    version(
+        "0.8.1",
+        sha256="caebf96676ace6a9c50436541c420ca4bb53f0639dcab825de6fa370aacf6baa",
+        url="https://github.com/arbor-sim/arbor/releases/download/v0.8.1/arbor-v0.8.1-full.tar.gz",
+    )
     version(
         "0.8",
         sha256="18df5600308841616996a9de93b55a105be0f59692daa5febd3a65aae5bc2c5d",
-- 
GitLab