From 6b6cc900b85fbf833fae94817b9406a0d690dc28 Mon Sep 17 00:00:00 2001 From: Thorsten Hater <24411438+thorstenhater@users.noreply.github.com> Date: Fri, 9 Aug 2024 12:22:00 +0200 Subject: [PATCH] Release v0.10.0 (#2380) # v0.10.0 (*08.08.2024*) ## Major Changes since v0.9.0 * Automatic network generation from high-level specifications. * Units at the user interface including scaling and conversion. * Morphologies are loaded through a unified interface; which produces a bundle of morphology, metadata, and segment tree. ## Internal Updates * Documentation overhaul * Python bindings offer type stubs; giving auto-completion and inline documentation in some editors/IDEs. * Performance improvements - Label resolution uses hashes instead of strings, saving memory, network traffic, and time. - Spike delivery is up to 30% faster leading to 10% end-to-end improvements in some cases (e.g. `example/brunel`) - Load balancing is faster and doesn't rely on MPI, leading to shorter setup times for large networks. * Fixes - Better support for source builds on MacOS (aarch64) - `modcc` no longer allows internal variables (`v`, `celsius`, ...) as `ASSIGNED` - Better support for raw (C++) mechanisms * MC cells renamed cable cells. ## Breaking changes * Return values of all morphology loaders have changed. * Raw (segment tree) loaders removed. * Support for Python 3.8 removed. * C++: Removed `simulation::inject_events`, use a generator instead. ## New Contributors * @ErbB4 made their first contribution in https://github.com/arbor-sim/arbor/pull/2271 **Full Changelog**: https://github.com/arbor-sim/arbor/compare/v0.9.0...v0.10.0 --- .github/workflows/build-pip-wheels.yml | 2 +- CHANGELOG.md | 32 ++++++++++++++++++++ VERSION | 2 +- cmake/GitSubmodule.cmake | 7 ++++- doc/contrib/release.rst | 6 ++-- doc/cpp/interconnectivity.rst | 12 +++++--- pyproject.toml | 3 +- python/stubs/arbor/__init__.pyi | 14 ++++++--- python/stubs/arbor/_arbor/__init__.pyi | 42 ++++++++++++++++++++++++++ 9 files changed, 103 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-pip-wheels.yml b/.github/workflows/build-pip-wheels.yml index 2b581d153e..22c5d2d64b 100644 --- a/.github/workflows/build-pip-wheels.yml +++ b/.github/workflows/build-pip-wheels.yml @@ -121,7 +121,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - submodules: "recursive" + submodules: recursive path: arbor - name: Make full tarball run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index c32763dda5..f887954560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,35 @@ +# v0.10.0 (*08.08.2024*) + +## Major Changes since v0.9.0 +* Automatic network generation from high-level specifications. +* Units at the user interface including scaling and conversion. +* Morphologies are loaded through a unified interface; which produces a bundle of morphology, metadata, and segment tree. + +## Internal Updates + +* Documentation overhaul +* Python bindings offer type stubs; giving auto-completion and inline documentation in some editors/IDEs. +* Performance improvements + - Label resolution uses hashes instead of strings, saving memory, network traffic, and time. + - Spike delivery is up to 30% faster leading to 10% end-to-end improvements in some cases (e.g. `example/brunel`) + - Load balancing is faster and doesn't rely on MPI, leading to shorter setup times for large networks. +* Fixes + - Better support for source builds on MacOS (aarch64) + - `modcc` no longer allows internal variables (`v`, `celsius`, ...) as `ASSIGNED` + - Better support for raw (C++) mechanisms +* MC cells renamed cable cells. + +## Breaking changes +* Return values of all morphology loaders have changed. +* Raw (segment tree) loaders removed. +* Support for Python 3.8 removed. +* C++: Removed `simulation::inject_events`, use a generator instead. + +## New Contributors +* @ErbB4 made their first contribution in https://github.com/arbor-sim/arbor/pull/2271 + +**Full Changelog**: https://github.com/arbor-sim/arbor/compare/v0.9.0...v0.10.0 + # v0.9.0 ** 2023 08 09 ** diff --git a/VERSION b/VERSION index dc9bff91aa..78bc1abd14 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.1-dev +0.10.0 diff --git a/cmake/GitSubmodule.cmake b/cmake/GitSubmodule.cmake index ab7778f6c8..954d07ca87 100644 --- a/cmake/GitSubmodule.cmake +++ b/cmake/GitSubmodule.cmake @@ -18,7 +18,12 @@ function(check_git_submodule name path) "Or download submodules recursively when checking out:\n" " git clone --recursive https://github.com/arbor-sim/arbor.git\n" ) - + get_filename_component(dotgit "${path}/" ABSOLUTE) + file(GLOB RESULT "${path}/*") + list(LENGTH RESULT RES_LEN) + if(NOT RES_LEN EQUAL 0) + message("However, the directory contains some ($RES_LEN) files. Possibly .git was omitted?") + endif() # if the repository was not available, and git failed, set AVAIL to false set(${success_var} OFF PARENT_SCOPE) endif() diff --git a/doc/contrib/release.rst b/doc/contrib/release.rst index e71f27eda8..52b39ff902 100644 --- a/doc/contrib/release.rst +++ b/doc/contrib/release.rst @@ -43,13 +43,13 @@ Update tags/versions and test - README.md, ATTRIBUTIONS.md, CONTRIBUTING.md, CHANGELOG.md. For autogenerated CHANGELOG, see below. - Verify MANIFEST.in (required for PyPI sdist). - Double-check that all examples/tutorials/etc are covered by CI. - - Check Python/pip/PyPi metadata and scripts, e.g., ``setup.py``, ``pyproject.toml``. + - Check Python/pip/PyPi metadata and scripts, e.g., ``pyproject.toml``. #. Create new temp-branch ending in ``-rc``. E.g. ``v0.9.0-rc`` #. Bump the ``VERSION`` file: - - For as long as `scikit-build-core` does not support loading fields from external files, also bump in `pyproject.toml` - - See also :ref:`dev-version` + - For as long as ``scikit-build-core`` does not support loading fields from external files, also bump in ```pyproject.toml`` + - See also :ref:``dev-version`` - Append ``-rc``. (Make sure there's no ``-dev``) #. Create a **draft PR**. Tag and push with ``-rc``. E.g. ``v0.9.0-rc`` diff --git a/doc/cpp/interconnectivity.rst b/doc/cpp/interconnectivity.rst index 5fa4f87d8e..b082338901 100644 --- a/doc/cpp/interconnectivity.rst +++ b/doc/cpp/interconnectivity.rst @@ -31,7 +31,7 @@ Interconnectivity The weight delivered to the target synapse. The weight is dimensionless, and its interpretation is specific to the synapse type of the target. For example, - the `expsyn` synapse interprets it as a conductance + the ``expsyn`` synapse interprets it as a conductance with units μS (micro-Siemens). .. cpp:member:: units::quantity delay @@ -54,12 +54,14 @@ Interconnectivity - global id, uniquely identifying the source object inside the remote simulation, - local id, uniquely identifying the location of the source on the source object, - - selection policy, how to map sources `(gid, lid)` to the targets in Arbor. + - selection policy, how to map sources ``(gid, lid)`` to the targets in Arbor. .. Note:: - The tuple ``(gid, lid)`` must be unique for each source. This addressing scheme follows Arbor's model of multiple - sources (threshold detectors) per cell. If the remote simulation does not provide multiple items per - source object, ``lid`` can be ignored and set to zero. + + The tuple ``(gid, lid)`` must be unique for each source. This addressing + scheme follows Arbor's model of multiple sources (threshold detectors) per + cell. If the remote simulation does not provide multiple items per source + object, ``lid`` can be ignored and set to zero. .. cpp:member:: cell_local_label_type target diff --git a/pyproject.toml b/pyproject.toml index e4eab10d33..747701582c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arbor" -version = "0.9.1-dev" # TODO: make dependent on VERSION file. Blocked by https://github.com/scikit-build/scikit-build-core/issues/230 +version = "0.10.0" # TODO: make dependent on VERSION file. Blocked by https://github.com/scikit-build/scikit-build-core/issues/230 readme = {file = "README.md", content-type = "text/markdown"} license = {file = "LICENSE"} description = "High performance simulation of networks of multicompartment neurons." @@ -36,6 +36,7 @@ cmake.args = [ "-DARB_WITH_PYTHON=ON", "-DARB_USE_BUNDLED_LIBS=ON", ] +sdist.include = ["ext/*/.git"] wheel.install-dir = "arbor" wheel.packages = [] diff --git a/python/stubs/arbor/__init__.pyi b/python/stubs/arbor/__init__.pyi index 83f19fd01b..22429e4af8 100644 --- a/python/stubs/arbor/__init__.pyi +++ b/python/stubs/arbor/__init__.pyi @@ -109,6 +109,8 @@ from arbor._arbor import poisson_schedule from arbor._arbor import print_config from arbor._arbor import probe from arbor._arbor import proc_allocation +from arbor._arbor import profiler_initialize +from arbor._arbor import profiler_summary from arbor._arbor import recipe from arbor._arbor import regular_schedule from arbor._arbor import reversal_potential @@ -247,6 +249,8 @@ __all__ = [ "print_config", "probe", "proc_allocation", + "profiler_initialize", + "profiler_summary", "recipe", "regular_schedule", "reversal_potential", @@ -279,21 +283,21 @@ __config__: dict = { "mpi4py": False, "gpu": None, "vectorize": True, - "profiling": False, + "profiling": True, "neuroml": True, "bundled": True, "version": "0.9.1-dev", - "source": "2024-03-01T14:59:23+01:00 dcdfe101f389cb4854ac3d0a067feeb280600c88 modified", - "build_config": "DEBUG", + "source": "2024-04-11T13:13:43+02:00 8dac3a25b35f3e73f7ad50c27bd06d018e10bb6f modified", + "build_config": "RELEASE", "arch": "native", "prefix": "/usr/local", - "python_lib_path": "/usr/local/lib/python3.12/site-packages", + "python_lib_path": "/opt/homebrew/lib/python3.12/site-packages", "binary_path": "bin", "lib_path": "lib", "data_path": "share", "CXX": "/opt/homebrew/bin/clang++", "pybind-version": "2.11.1", - "timestamp": "Mar 4 2024 20:56:20", + "timestamp": "Apr 11 2024 20:38:51", } __version__: str = "0.9.1-dev" mnpos: int = 4294967295 diff --git a/python/stubs/arbor/_arbor/__init__.pyi b/python/stubs/arbor/_arbor/__init__.pyi index 94e4178308..4e941063a5 100644 --- a/python/stubs/arbor/_arbor/__init__.pyi +++ b/python/stubs/arbor/_arbor/__init__.pyi @@ -119,6 +119,8 @@ __all__ = [ "print_config", "probe", "proc_allocation", + "profiler_initialize", + "profiler_summary", "recipe", "regular_schedule", "reversal_potential", @@ -2046,6 +2048,40 @@ class morphology: A cell morphology. """ + def __init__(self, arg0: segment_tree) -> None: ... + def __str__(self) -> str: ... + def branch_children(self, i: int) -> list[int]: + """ + The child branches of branch i. + """ + + def branch_parent(self, i: int) -> int: + """ + The parent branch of branch i. + """ + + def branch_segments(self, i: int) -> list[msegment]: + """ + A list of the segments in branch i, ordered from proximal to distal ends of the branch. + """ + + def to_segment_tree(self) -> segment_tree: + """ + Convert this morphology to a segment_tree. + """ + + @property + def empty(self) -> bool: + """ + Whether the morphology is empty. + """ + + @property + def num_branches(self) -> int: + """ + The number of branches in the morphology. + """ + class morphology_provider: def __init__(self, morphology: morphology) -> None: """ @@ -3277,6 +3313,12 @@ def print_config() -> None: Print Arbor's configuration. """ +def profiler_initialize(arg0: context) -> None: ... +def profiler_summary(limit: float = 0.0) -> str: + """ + Show summary of the profile; printing contributions above `limit` percent. Defaults to showing all. + """ + def stochastic_catalogue() -> catalogue: ... @typing.overload def write_component(