From c683a1f77f4ccc96d2a20ec3604cc11727eda759 Mon Sep 17 00:00:00 2001 From: Brent Huisman <brenthuisman@users.noreply.github.com> Date: Thu, 22 Dec 2022 16:09:33 +0100 Subject: [PATCH] v0.8.1 (#2072) Co-authored-by: boeschf <48126478+boeschf@users.noreply.github.com> --- .../workflows/{ciwheel.yml => release.yml} | 30 +++++++++++- CHANGELOG.md | 26 ++++++++++ VERSION | 2 +- doc/contrib/release.rst | 39 ++++++++------- python/example/calcium_stdp.py | 5 +- python/example/example_requirements.txt | 1 + python/example/gap_junctions.py | 2 +- python/example/network_ring.py | 6 +-- python/example/network_ring_gpu.py | 6 +-- python/example/network_ring_mpi_plot.py | 6 +-- .../network_two_cells_gap_junctions.py | 2 +- python/example/single_cell_allen.py | 4 +- python/example/single_cell_bluepyopt_l5pc.py | 8 ++- .../single_cell_bluepyopt_simplecell.py | 8 ++- python/example/single_cell_cable.py | 6 +-- python/example/single_cell_detailed.py | 8 ++- python/example/single_cell_detailed_recipe.py | 8 ++- python/example/single_cell_model.py | 2 +- python/example/single_cell_nml.py | 8 ++- python/example/single_cell_recipe.py | 2 +- python/example/single_cell_stdp.py | 4 +- python/example/single_cell_swc.py | 8 ++- python/example/v-clamp.py | 8 ++- scripts/run_python_examples.sh | 49 ++++++++++--------- 24 files changed, 171 insertions(+), 77 deletions(-) rename .github/workflows/{ciwheel.yml => release.yml} (75%) diff --git a/.github/workflows/ciwheel.yml b/.github/workflows/release.yml similarity index 75% rename from .github/workflows/ciwheel.yml rename to .github/workflows/release.yml index 809c978e..895a20e6 100644 --- a/.github/workflows/ciwheel.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ - -name: Arbor on Wheels +name: Produce Arbor release artifacts on: push: @@ -107,3 +106,30 @@ jobs: env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.TESTPYPI_SECRET }} + + make_release: + name: draft new GitHub release + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-20.04 + needs: [build_binary_wheels, build_sdist] + steps: + - name: "Clone w/ submodules" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: "recursive" + path: arbor + - name: Make full tarball + run: | + the_ref=${{ github.ref }} + the_tag="${the_ref/refs\/tags\//}" + $GITHUB_WORKSPACE/arbor/scripts/create_tarball $GITHUB_WORKSPACE/arbor $the_tag $GITHUB_WORKSPACE/arbor-$the_tag-full.tar.gz + - name: "Make Release" + uses: ncipollo/release-action@v1 + with: + omitBody: false + draft: true + prerelease: false + generateReleaseNotes: true + artifacts: '*.whl,*full.tar.gz' + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 537d089b..55405a5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +# v0.8.1 + +** 2022 12 20 ** + +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. + +## Major new features + +- Voltage Processes: add the VOLTAGE_PROCESS mechanism kind to modcc, allowing for direct writing to the membrane voltage (#2033) +- Spack gpu option: added conditional variant for cuda builds to enable GPU-based random number generation (#2043) +- SDE Tutorial (#2044) + +## Breaking changes since v0.7 + +- None 💃! + +## Bug fixed + +- Fix ornstein_uhlenbeck example on gpu (#2039) +- Setting ARB_MODCC was broken and nunfunctional. Fixed. (#2029) +- The `--cxx` flag in `arbor-build-catalogue` is now properly used; falls back to `c++`. (#2051) + +## Full commit log + +... + # v0.8 ** 2022 11 15 ** diff --git a/VERSION b/VERSION index d182dc91..6f4eebdf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1-dev +0.8.1 diff --git a/doc/contrib/release.rst b/doc/contrib/release.rst index 699f6200..22a5b1d6 100644 --- a/doc/contrib/release.rst +++ b/doc/contrib/release.rst @@ -82,7 +82,7 @@ Release #. Change ``VERSION``. Make sure does not end with ``-rc`` or ``-dev``. -#. Update ``scripts/check-all-tags.sh`` to check the current tag. +#. Merge the PR. #. Tag @@ -94,6 +94,8 @@ Release #. Upload to pypi & verify + Get the wheels from test PyPI or the Github Action that produced the release artifacts. + .. code-block:: bash twine upload -r arborpypi dist/* @@ -102,34 +104,33 @@ Release pip install arbor python -c 'import arbor; print(arbor.__config__)' -#. Create tarball with +#. Create Github Release: https://github.com/arbor-sim/arbor/releases + + - The Github action that produced the release artifacts should have prepared a draft Release. + - If not: + - Go to `GH tags`_ and click “…†and “Create release†+ - Categorize/edit Github's autogenerated release notes (alternatively go through merged PRs to come up with a changelog). + - Manually build full tarball: + ``scripts/create_tarball ~/loc/of/arbor tagname outputfile`` - eg ``scripts/create_tarball /full/path/to/arbor v0.5.1 ~/arbor-v0.5.1-full.tar.gz`` - -#. Download output of wheel action associated to this release commit and extract (verify the wheels and - source targz is in /dist) - - Of course, the above action must have passed the tests successfully. - -#. Update ``spack/package.py``. The checksum of the targz is the sha256sum. +Post Release +------------ -#. Start a new release on Zenodo, this allocated a DOI, but you don't have to finish it right away. Add new Zenodo badge/link to docs/README. +#. Place the Github generated release notes in ``CHANGELOG``. -#. Create Github Release: https://github.com/arbor-sim/arbor/releases +#. Start a new release on Zenodo, this allocated a DOI, but you don't have to finish it right away. Add new Zenodo badge/link to docs/README. - - Go to `GH tags`_ and click “…†and “Create release†- - Categorize/edit Github's autogenerated release notes (alternatively go through merged PRs to come up with a changelog). - - add tarball to release, created in previous step. - #. Update Zenodo with authors and changelog created in previous step and submit. -Post Release ------------- - #. Make a new PR setting ``VERSION`` to the next with a trailing ``-dev``. E.g. if you just release ``3.14``, change ``VERSION`` to ``3.15-dev`` - - - Include changes such as to ``spack/package.py``, ``CITATIONS``, ``doc/index.rst`` in postrel PR. Copy Zenodo BibTex export to ``CITATIONS``. + + - Update ``spack/package.py``. The checksum of the targz is the sha256sum. + - Include changes such as to ``CITATIONS``, ``doc/index.rst`` in postrel PR. Copy Zenodo BibTex export to ``CITATIONS``. + +#. Update ``scripts/check-all-tags.sh`` to check the current tag. #. Update spack package / Ebrains Lab / Opensourcebrain diff --git a/python/example/calcium_stdp.py b/python/example/calcium_stdp.py index ba86050f..6f287184 100644 --- a/python/example/calcium_stdp.py +++ b/python/example/calcium_stdp.py @@ -224,9 +224,8 @@ ref = numpy.array( ) df_ref = pandas.DataFrame({"ds": ref[:, 1], "ms": ref[:, 0], "type": "Reference"}) -seaborn.set_theme() -df = pandas.concat(results) -df = pandas.concat([df, df_ref]) +df = pandas.concat(results, ignore_index=True) +df = pandas.concat([df, df_ref], ignore_index=True) plt = seaborn.relplot(kind="line", data=df, x="ms", y="ds", hue="type") plt.set_xlabels("lag time difference (ms)") plt.set_ylabels("change in synaptic strenght (after/before)") diff --git a/python/example/example_requirements.txt b/python/example/example_requirements.txt index 05a99b1d..c06bf62e 100644 --- a/python/example/example_requirements.txt +++ b/python/example/example_requirements.txt @@ -1,4 +1,5 @@ # pip requirements file +numpy!=1.24.0 # See https://github.com/numpy/numpy/issues/22826 LFPykit>=0.3 pandas seaborn diff --git a/python/example/gap_junctions.py b/python/example/gap_junctions.py index a06bc8de..50da0589 100644 --- a/python/example/gap_junctions.py +++ b/python/example/gap_junctions.py @@ -160,5 +160,5 @@ for gid in range(ncells): ) df = pandas.concat(df_list, ignore_index=True) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", ci=None) +seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", errorbar=None) plt.show() diff --git a/python/example/network_ring.py b/python/example/network_ring.py index d30e83a4..786c8cba 100755 --- a/python/example/network_ring.py +++ b/python/example/network_ring.py @@ -152,6 +152,6 @@ for gid in range(ncells): ) df = pandas.concat(df_list, ignore_index=True) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", ci=None).savefig( - "network_ring_result.svg" -) +seaborn.relplot( + data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", errorbar=None +).savefig("network_ring_result.svg") diff --git a/python/example/network_ring_gpu.py b/python/example/network_ring_gpu.py index 22a9b43d..ff4682c9 100644 --- a/python/example/network_ring_gpu.py +++ b/python/example/network_ring_gpu.py @@ -179,6 +179,6 @@ for gid in range(ncells): ) df = pandas.concat(df_list, ignore_index=True) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", ci=None).savefig( - "network_ring_gpu_result.svg" -) +seaborn.relplot( + data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", errorbar=None +).savefig("network_ring_gpu_result.svg") diff --git a/python/example/network_ring_mpi_plot.py b/python/example/network_ring_mpi_plot.py index d5ea5d32..36db6a6a 100644 --- a/python/example/network_ring_mpi_plot.py +++ b/python/example/network_ring_mpi_plot.py @@ -12,6 +12,6 @@ for result in results: df_list.append(pandas.read_csv(result)) df = pandas.concat(df_list, ignore_index=True) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", ci=None).savefig( - "mpi_result.svg" -) +seaborn.relplot( + data=df, kind="line", x="t/ms", y="U/mV", hue="Cell", errorbar=None +).savefig("mpi_result.svg") diff --git a/python/example/network_two_cells_gap_junctions.py b/python/example/network_two_cells_gap_junctions.py index 1eeec49f..181833f9 100755 --- a/python/example/network_two_cells_gap_junctions.py +++ b/python/example/network_two_cells_gap_junctions.py @@ -183,7 +183,7 @@ if __name__ == "__main__": fig, ax = plt.subplots() # plot the membrane potentials of the two cells as function of time - seaborn.lineplot(ax=ax, data=df, x="t/ms", y="U/mV", hue="Cell", ci=None) + seaborn.lineplot(ax=ax, data=df, x="t/ms", y="U/mV", hue="Cell", errorbar=None) # area of cells area = args.length * 1e-6 * 2 * np.pi * args.radius * 1e-6 diff --git a/python/example/single_cell_allen.py b/python/example/single_cell_allen.py index dade963a..df961492 100644 --- a/python/example/single_cell_allen.py +++ b/python/example/single_cell_allen.py @@ -153,7 +153,9 @@ df_list.append( ) ) df = pandas.concat(df_list, ignore_index=True) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Simulator", ci=None) +seaborn.relplot( + data=df, kind="line", x="t/ms", y="U/mV", hue="Simulator", errorbar=None +) plt.scatter( model.spikes, [-40] * len(model.spikes), color=seaborn.color_palette()[2], zorder=20 ) diff --git a/python/example/single_cell_bluepyopt_l5pc.py b/python/example/single_cell_bluepyopt_l5pc.py index 6af3d21a..2a8b6f39 100755 --- a/python/example/single_cell_bluepyopt_l5pc.py +++ b/python/example/single_cell_bluepyopt_l5pc.py @@ -129,5 +129,11 @@ for i in range(len(data)): ) df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_bluepyopt_l5pc_bAP_dend1.svg") diff --git a/python/example/single_cell_bluepyopt_simplecell.py b/python/example/single_cell_bluepyopt_simplecell.py index 1b413164..1e7a993b 100755 --- a/python/example/single_cell_bluepyopt_simplecell.py +++ b/python/example/single_cell_bluepyopt_simplecell.py @@ -81,5 +81,11 @@ for t in m.traces: df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_bluepyopt_simplecell.svg") diff --git a/python/example/single_cell_cable.py b/python/example/single_cell_cable.py index 25f6aa14..348fad91 100755 --- a/python/example/single_cell_cable.py +++ b/python/example/single_cell_cable.py @@ -222,9 +222,9 @@ if __name__ == "__main__": ) df = pandas.concat(df_list, ignore_index=True) - seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", hue="Probe", ci=None).set( - xlim=(9, 14) - ).savefig("single_cell_cable_result.svg") + seaborn.relplot( + data=df, kind="line", x="t/ms", y="U/mV", hue="Probe", errorbar=None + ).set(xlim=(9, 14)).savefig("single_cell_cable_result.svg") # calculcate the idealized conduction velocity, cf. cable equation data = [sim.samples(handle)[0][0] for handle in handles] diff --git a/python/example/single_cell_detailed.py b/python/example/single_cell_detailed.py index 25495c51..0d2222ed 100755 --- a/python/example/single_cell_detailed.py +++ b/python/example/single_cell_detailed.py @@ -117,5 +117,11 @@ for t in model.traces: ) df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_detailed_result.svg") diff --git a/python/example/single_cell_detailed_recipe.py b/python/example/single_cell_detailed_recipe.py index b5056254..cefb4dc9 100644 --- a/python/example/single_cell_detailed_recipe.py +++ b/python/example/single_cell_detailed_recipe.py @@ -151,5 +151,11 @@ for i in range(len(data)): ) df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_recipe_result.svg") diff --git a/python/example/single_cell_model.py b/python/example/single_cell_model.py index 0737983f..054443e2 100755 --- a/python/example/single_cell_model.py +++ b/python/example/single_cell_model.py @@ -46,7 +46,7 @@ else: print("Plotting results ...") seaborn.set_theme() # Apply some styling to the plot df = pandas.DataFrame({"t/ms": m.traces[0].time, "U/mV": m.traces[0].value}) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", ci=None).savefig( +seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", errorbar=None).savefig( "single_cell_model_result.svg" ) diff --git a/python/example/single_cell_nml.py b/python/example/single_cell_nml.py index f69b195f..8992ca1e 100755 --- a/python/example/single_cell_nml.py +++ b/python/example/single_cell_nml.py @@ -112,5 +112,11 @@ for t in m.traces: df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_nml.svg") diff --git a/python/example/single_cell_recipe.py b/python/example/single_cell_recipe.py index 447266e5..3d498eae 100644 --- a/python/example/single_cell_recipe.py +++ b/python/example/single_cell_recipe.py @@ -92,7 +92,7 @@ else: print("Plotting results ...") df = pandas.DataFrame({"t/ms": data[:, 0], "U/mV": data[:, 1]}) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", ci=None).savefig( +seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", errorbar=None).savefig( "single_cell_recipe_result.svg" ) diff --git a/python/example/single_cell_stdp.py b/python/example/single_cell_stdp.py index 9799d69f..b67d45f2 100755 --- a/python/example/single_cell_stdp.py +++ b/python/example/single_cell_stdp.py @@ -100,7 +100,7 @@ def run(dT, n_pairs=1, do_plots=False): data, meta = sim.samples(handle)[0] df = pd.DataFrame({"t/ms": data[:, 0], var: data[:, 1]}) - sns.relplot(data=df, kind="line", x="t/ms", y=var, ci=None).savefig( + sns.relplot(data=df, kind="line", x="t/ms", y=var, errorbar=None).savefig( f"single_cell_stdp_result_{var}.svg" ) @@ -111,6 +111,6 @@ def run(dT, n_pairs=1, do_plots=False): data = np.array([(dT, run(dT)) for dT in np.arange(-20, 20, 0.5)]) df = pd.DataFrame({"t/ms": data[:, 0], "dw": data[:, 1]}) print("Plotting results ...") -sns.relplot(data=df, x="t/ms", y="dw", kind="line", ci=None).savefig( +sns.relplot(data=df, x="t/ms", y="dw", kind="line", errorbar=None).savefig( "single_cell_stdp.svg" ) diff --git a/python/example/single_cell_swc.py b/python/example/single_cell_swc.py index 4edaec7b..febfe774 100755 --- a/python/example/single_cell_swc.py +++ b/python/example/single_cell_swc.py @@ -102,5 +102,11 @@ for t in m.traces: df = pandas.concat(df_list, ignore_index=True) seaborn.relplot( - data=df, kind="line", x="t/ms", y="U/mV", hue="Location", col="Variable", ci=None + data=df, + kind="line", + x="t/ms", + y="U/mV", + hue="Location", + col="Variable", + errorbar=None, ).savefig("single_cell_swc.svg") diff --git a/python/example/v-clamp.py b/python/example/v-clamp.py index 27469177..ba34ebd7 100755 --- a/python/example/v-clamp.py +++ b/python/example/v-clamp.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# This script is included in documentation. Adapt line numbers if touched. import arbor import pandas # You may have to pip install these. @@ -45,11 +44,10 @@ else: # (9) Plot the recorded voltages over time. print("Plotting results ...") -seaborn.set_theme() # Apply some styling to the plot df = pandas.DataFrame({"t/ms": m.traces[0].time, "U/mV": m.traces[0].value}) -seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", ci=None).savefig( - "single_cell_model_result.svg" +seaborn.relplot(data=df, kind="line", x="t/ms", y="U/mV", errorbar=None).savefig( + "v-clamp.svg" ) # (10) Optionally, you can store your results for later processing. -df.to_csv("single_cell_model_result.csv", float_format="%g") +df.to_csv("v-clamp.csv", float_format="%g") diff --git a/scripts/run_python_examples.sh b/scripts/run_python_examples.sh index e561ca58..e79b34d5 100755 --- a/scripts/run_python_examples.sh +++ b/scripts/run_python_examples.sh @@ -10,26 +10,31 @@ fi PREFIX=${1:-} -$PREFIX python -m pip install -r python/example/example_requirements.txt +$PREFIX python3 -m pip install -r python/example/example_requirements.txt -U -$PREFIX python python/example/brunel.py -n 400 -m 100 -e 20 -p 0.1 -w 1.2 -d 1 -g 0.5 -l 5 -t 100 -s 1 -G 50 -S 123 -# $PREFIX python python/dynamic-catalogue.py # arbor-build-catalog is a test already -$PREFIX python python/example/gap_junctions.py -$PREFIX python python/example/single_cell_cable.py -$PREFIX python python/example/single_cell_detailed_recipe.py python/example/single_cell_detailed.swc -$PREFIX python python/example/single_cell_detailed.py python/example/single_cell_detailed.swc -$PREFIX python python/example/probe_lfpykit.py python/example/single_cell_detailed.swc -$PREFIX python python/example/single_cell_model.py -$PREFIX python python/example/single_cell_nml.py python/example/morph.nml -$PREFIX python python/example/single_cell_recipe.py -$PREFIX python python/example/single_cell_stdp.py -$PREFIX python python/example/single_cell_swc.py python/example/single_cell_detailed.swc -$PREFIX python python/example/network_ring.py -# $PREFIX python python/example/network_ring_mpi.py # requires MPI -# $PREFIX python python/example/network_ring_mpi_plot.py # no need to test -$PREFIX python python/example/network_ring_gpu.py # by default, gpu_id=None -$PREFIX python python/example/network_two_cells_gap_junctions.py -$PREFIX python python/example/diffusion.py -$PREFIX python python/example/plasticity.py -$PREFIX python python/example/v-clamp.py -$PREFIX python python/example/calcium_stdp.py +runpyex () { + echo "=== Executing $1 ======================================" + $PREFIX python3 python/example/$* +} + +runpyex brunel.py -n 400 -m 100 -e 20 -p 0.1 -w 1.2 -d 1 -g 0.5 -l 5 -t 100 -s 1 -G 50 -S 123 +# runpyex dynamic-catalogue.py # arbor-build-catalog is a test already +runpyex gap_junctions.py +runpyex single_cell_cable.py +runpyex single_cell_detailed_recipe.py python/example/single_cell_detailed.swc +runpyex single_cell_detailed.py python/example/single_cell_detailed.swc +runpyex probe_lfpykit.py python/example/single_cell_detailed.swc +runpyex single_cell_model.py +runpyex single_cell_nml.py python/example/morph.nml +runpyex single_cell_recipe.py +runpyex single_cell_stdp.py +runpyex single_cell_swc.py python/example/single_cell_detailed.swc +runpyex network_ring.py +# runpyex network_ring_mpi.py # requires MPI +# runpyex network_ring_mpi_plot.py # no need to test +runpyex network_ring_gpu.py # by default, gpu_id=None +runpyex network_two_cells_gap_junctions.py +runpyex diffusion.py +runpyex plasticity.py +runpyex v-clamp.py +runpyex calcium_stdp.py -- GitLab