Skip to content

Commit

Permalink
Merge pull request #2849 from nest/3.5-develop-2843-2838-2830
Browse files Browse the repository at this point in the history
Add cherry-picked changes from #2843, #2838, and #2830
  • Loading branch information
heplesser authored Jul 3, 2023
2 parents 785b15e + 68cd867 commit d2f85ba
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/htmldoc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def patch_documentation(patch_url):

print("Preparing patch...")
try:
git_dir = repo_root_dir / ".git"
git_dir = f"{repo_root_dir}/.git"
git_hash = subprocess.check_output(
f"GIT_DIR='{git_dir}' git rev-parse HEAD", shell=True, encoding="utf8"
).strip()
Expand All @@ -402,7 +402,7 @@ def patch_documentation(patch_url):
print(f" retrieving {patch_url}")
urlretrieve(patch_url, patch_file)
print(f" applying {patch_file}")
result = subprocess.check_output("patch -p3", stdin=open(patch_file, "r"), stderr=subprocess.STDOUT, shell=True)
result = subprocess.check_output(f"git apply '{patch_file}'", stderr=subprocess.STDOUT, shell=True)
print(f"Patch result: {result}")
except Exception as exc:
print(f"Error while applying patch: {exc}")
Expand Down
2 changes: 2 additions & 0 deletions doc/htmldoc/whats_new/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ versions of NEST. On the linked pages, you will find both information about new
features, as well as quick guides on how to transition your simulation code to
the new versions.

* :ref:`NEST 3.5 <release_3.5>`
* :ref:`NEST 3.4 <release_3.4>`
* :ref:`NEST 3.3 <release_3.3>`
* :ref:`NEST 3.2 <release_3.2>`
Expand All @@ -19,6 +20,7 @@ the new versions.
:hidden:
:glob:

v3.5/*
v3.4/*
v3.3/*
v3.2/*
Expand Down
67 changes: 67 additions & 0 deletions doc/htmldoc/whats_new/v3.5/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.. _release_3.5:

What's new in NEST 3.5
======================

This page contains a summary of important breaking and non-breaking
changes from NEST 3.4 to NEST 3.5. In addition to the `release notes
on GitHub <https://github.com/nest/nest-simulator/releases/>`_, this
page also contains transition information that helps you to update
your simulation scripts when you come from an older version of NEST.

If you transition from an earlier version, please see our extensive
:ref:`transition guide from NEST 2.x to 3.0 <refguide_2_3>` and the
:ref:`list of updates for previous releases in the 3.x series
<whats_new>`.


NEST supports the SONATA format
-------------------------------

The SONATA (Scalable Open Network Architecture TemplAte) format provides a framework
for storage and exchange of network models and simulation configurations.

NEST now supports building and simulating networks of point neurons described by
this SONATA format.

See our docs to learn more:

* The :ref:`nest_sonata` for all the details
* An :doc:`example SONATA script <../../../../auto_examples/sonata_example/sonata_network>`
* PyNEST API documentation for the :py:class:`.SonataNetwork` class


Run PyNEST examples as notebooks - installation free
----------------------------------------------------

Using the EBRAINS JupyterHub service, you can now
run the PyNEST examples as Jupyter Notebooks with a click of a button.

No need to install NEST or other packages, the EBRAINS environment has
everything you already need.

Explore the :ref:`pynest_examples` and try it out!

New docs for high performance computing (HPC)
---------------------------------------------

We have new documentation all about optmizing performance of NEST on HPC systems.

Learn about creating a job script, MPI processes and threading. We also have new info on
benchmarking NEST.

Check it out:

* :ref:`optimize_performance`
* :ref:`benchmark`

New model: spike_train_injector
-------------------------------

The :doc:`spike_train_injector <../../../../models/spike_train_injector>` emits spikes at prescribed spike times which are given as an array.

We recommend its use in multi-threaded simulations where spike-emitting neurons, in a somewhat large external population, are modeled on an individual basis.

It was created to prevent an unwanted increase in memory consumption with replication at each virtual process, which
happened when external neurons were modeled as a ``spike_generator``.

11 changes: 10 additions & 1 deletion pynest/nest/lib/hl_api_sonata.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from pathlib import Path, PurePath

import numpy as np
import pandas as pd

from .. import pynestkernel as kernel
from ..ll_api import sli_func, sps, sr
Expand All @@ -34,6 +33,13 @@
from .hl_api_simulation import SetKernelStatus, Simulate
from .hl_api_types import NodeCollection

try:
import pandas as pd

have_pandas = True
except ImportError:
have_pandas = False

try:
import h5py

Expand Down Expand Up @@ -101,6 +107,9 @@ def __init__(self, config, sim_config=None):
if not have_h5py:
msg = "SonataNetwork unavailable because h5py is not installed or could not be imported"
raise kernel.NESTError(msg)
if not have_pandas:
msg = "SonataNetwork unavailable because pandas is not installed or could not be imported"
raise kernel.NESTError(msg)

self._node_collections = {}
self._edges_maps = []
Expand Down

0 comments on commit d2f85ba

Please sign in to comment.