Skip to content

Commit 1165289

Browse files
authored
Merge branch 'master' into fix-doc-warning-format
2 parents 4bdb09e + 67f9cc7 commit 1165289

91 files changed

Lines changed: 3811 additions & 173 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
all:
2020
name: C/C++, CMake and Python
21-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-24.04
2222
timeout-minutes: 5
2323
steps:
2424
- uses: actions/checkout@v4

.github/workflows/neuron-ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,17 @@ jobs:
217217
# A automake >= 1.16.5 is needed for python 3.12 because it generates a python script
218218
# called py-compile and the original one is not supporting this version of python
219219
# Once ubuntu got a newer version of automake we can remove this part.
220+
# Tarball from ci-deps-v1 via ci/deps (see MANIFEST id automake-1.16.5-src).
220221
if: matrix.config.music == 'ON' && startsWith(matrix.os, 'ubuntu')
221222
run: |
222-
curl -L -o automake.tar.xz https://ftpmirror.gnu.org/gnu/automake/automake-1.16.5.tar.xz
223-
tar -xf automake.tar.xz
224-
cd automake-1.16.5/
223+
export NRN_CI_DEPS_SOURCE=release
224+
bash "${{ github.workspace }}/ci/deps/fetch.sh" automake-1.16.5-src "${{ runner.temp }}"
225+
tar -xf "${{ runner.temp }}/automake-1.16.5.tar.xz" -C "${{ runner.temp }}"
226+
cd "${{ runner.temp }}/automake-1.16.5/"
225227
./configure --prefix=/usr/
226228
make -j
227229
sudo make -j install
228230
automake --version
229-
working-directory: ${{runner.temp}}
230231
231232
- name: Setup MUSIC@${{ env.MUSIC_VERSION }}
232233
if: matrix.config.music == 'ON'

.github/workflows/wheels-template.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ jobs:
114114
sudo bash packaging/python/build_static_readline_osx.bash
115115
116116
- name: Change name of package for release
117-
if: inputs.build_type == 'release'
117+
if: inputs.build_type == 'nightly'
118118
run: |
119119
python3 -m venv venv
120120
source venv/bin/activate
121121
python3 -m pip install tomli tomli-w
122-
python3 packaging/python/change_name.py ./pyproject.toml neuron
122+
python3 packaging/python/change_name.py ./pyproject.toml neuron-nightly
123123
124124
- name: Optimize RX3D Python module
125125
if: inputs.optimize_rxd == true
@@ -151,18 +151,9 @@ jobs:
151151
run: |
152152
sudo apt update
153153
sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev ninja-build
154-
155-
- name: "Apply workaround for MPICH on Ubuntu 24.04"
156-
if: inputs.platform == 'ubuntu-24.04'
157-
run: |
158-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
159-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
160-
# This is fixed in version 4.2.0-5.1, but this version has not been
161-
# backported, so as a workaround, we install that version manually
162-
sudo apt install -y mpich
163-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb'
164-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb'
165-
sudo dpkg --install mpich_4.2.0-5.1_amd64.deb libmpich12_4.2.0-5.1_amd64.deb
154+
# Ubuntu 24.04: pin working mpich from ci/deps (no Launchpad download).
155+
# See ci/deps/README.md and LP#2072338.
156+
bash ci/deps/install_mpich_noble.sh
166157
167158
- name: Set env vars for testing (Linux)
168159
if: startsWith(inputs.platform, 'ubuntu')

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ virtualenv
2222
*.lo
2323
docs/_build
2424
docs/_generated
25+
# CI managed-download scratch (publish.sh); blobs live on GitHub Releases
26+
ci/deps/assets/
2527
.vscode
2628
.coverage*
2729
coverage*.xml

CMakeLists.txt

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ project(
1919
NEURON
2020
VERSION 9.0.1
2121
LANGUAGES C CXX
22-
HOMEPAGE_URL "https://nrn.readthedocs.io/")
22+
HOMEPAGE_URL "https://www.neuronsimulator.org/")
2323

2424
# =============================================================================
2525
# CMake common project settings
@@ -216,7 +216,7 @@ set(NRN_RX3D_OPT_LEVEL
216216
"${NRN_RX3D_OPT_LEVEL_DEFAULT}"
217217
CACHE STRING "Optimization level for Cython generated files (non-zero may compile slowly)")
218218

219-
option(NRN_ENABLE_COVERAGE "EnableCode Coverage (make cover_begin, make cover_html)" OFF)
219+
option(NRN_ENABLE_COVERAGE "EnableCode Coverage (cover-begin, cover-html, cover-diff)" OFF)
220220
set(NRN_COVERAGE_FILES
221221
""
222222
CACHE STRING "semicolon (;) separated list of files to collect code coverage")
@@ -949,21 +949,43 @@ add_custom_target(
949949
COMMAND ${PROJECT_SOURCE_DIR}/external/coding-conventions/bin/format
950950
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
951951

952-
# Prepare a shell script to format only files modified with respect to master branch
952+
# Prepare a shell script to format only files modified with respect to master/main branch that still
953+
# exist on disk (filters out deleted files).
953954
file(
954955
WRITE ${CMAKE_CURRENT_BINARY_DIR}/format-pr.sh
955-
"\
956-
#!bash\n\
957-
set -e\n\
958-
cmd='cd ${PROJECT_SOURCE_DIR} && external/coding-conventions/bin/format `git diff --name-only master`'\n\
959-
echo $cmd\n\
960-
cd ${PROJECT_SOURCE_DIR} && external/coding-conventions/bin/format `git diff --name-only master`\n\
956+
"#!/bin/bash
957+
set -euo pipefail
958+
959+
# Try 'main' first, then fall back to 'master'
960+
for base in main master; do
961+
if git rev-parse --verify \"\$base\" >/dev/null 2>&1; then
962+
BASE_BRANCH=\"\$base\"
963+
break
964+
fi
965+
done
966+
967+
if [ -z \"\${BASE_BRANCH:-}\" ]; then
968+
echo \"Error: Neither 'main' nor 'master' branch found.\" >&2
969+
exit 1
970+
fi
971+
972+
echo \"Formatting changes vs '\$BASE_BRANCH' (existing files only)...\" >&2
973+
974+
# Get changed files (null-delimited so names with spaces work), only pass
975+
# files that still exist.
976+
git diff -z --name-only \"\$BASE_BRANCH\" | \\
977+
while IFS= read -r -d '' file; do
978+
if [ -e \"\$file\" ]; then
979+
printf '%s\\0' \"\$file\"
980+
fi
981+
done | \\
982+
xargs -0 --no-run-if-empty external/coding-conventions/bin/format \"\$@\"
961983
")
962984

963985
add_custom_target(
964986
format-pr
965987
COMMAND bash ${CMAKE_CURRENT_BINARY_DIR}/format-pr.sh
966-
COMMENT "Format only files modified with respect to master branch."
988+
COMMENT "Format only files modified with respect to main/master (existing files only)"
967989
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
968990

969991
# =============================================================================

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://dev.azure.com/neuronsimulator/nrn/_apis/build/status/neuronsimulator.nrn?branchName=master)](https://dev.azure.com/neuronsimulator/nrn/_build/latest?definitionId=1&branchName=master) [![Actions Status](https://github.com/neuronsimulator/nrn/actions/workflows/windows.yml/badge.svg?branch=master)](https://github.com/neuronsimulator/nrn/actions) [![Actions Status](https://github.com/neuronsimulator/nrn/workflows/NEURON%20CI/badge.svg)](https://github.com/neuronsimulator/nrn/actions) [![codecov](https://codecov.io/gh/neuronsimulator/nrn/branch/master/graph/badge.svg?token=T7PIDw6LrC)](https://codecov.io/gh/neuronsimulator/nrn) [![Documentation Status](https://readthedocs.org/projects/nrn/badge/?version=latest)](http://nrn.readthedocs.io/?badge=latest)
22

33
# NEURON
4-
NEURON is a simulator for models of neurons and networks of neuron. See [nrn.readthedocs.io](https://nrn.readthedocs.io) for documentation, tutorials, and announcements of courses and conferences. Installers are available on [GitHub Releases](https://github.com/neuronsimulator/nrn/releases) and the source code on [GitHub](https://github.com/neuronsimulator/nrn).
4+
NEURON is a simulator for models of neurons and networks of neuron. See [https://www.neuronsimulator.org](https://www.neuronsimulator.org) for documentation, tutorials, and announcements of courses and conferences. Installers are available on [GitHub Releases](https://github.com/neuronsimulator/nrn/releases) and the source code on [GitHub](https://github.com/neuronsimulator/nrn).
55
Ask questions on our [Discussion Forum](https://github.com/neuronsimulator/nrn/discussions).
66

77
## Installing NEURON
@@ -26,7 +26,7 @@ It is possible to install the Linux Python wheels on Windows via the Windows Sub
2626
2727
## Documentation
2828

29-
* See [https://nrn.readthedocs.io/en/latest/](https://nrn.readthedocs.io/en/latest/) for latest, nightly snapshot
29+
* See [https://www.neuronsimulator.org/en/latest/](https://www.neuronsimulator.org/en/latest/) for latest, nightly snapshot
3030
* See [docs/README.md](docs/README.md) for information on documentation (local build, Read the Docs setup)
3131

3232
## Changelog

azure-pipelines.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,9 @@ stages:
8181
- script: |
8282
sudo apt update
8383
sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev
84-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
85-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
86-
# This is fixed in version 4.2.0-5.1, but this version has not been
87-
# backported, so as a workaround, we install that version manually
88-
source /etc/os-release
89-
if [[ "$ID" == "ubuntu" && "$VERSION_ID" == "24.04" ]]; then
90-
# mpich is fundamentally broken on Ubuntu 24.04 LTS, for more details see:
91-
# https://bugs.launchpad.net/ubuntu/+source/mpich/+bug/2072338
92-
# This is fixed in version 4.2.0-5.1, but this version has not been
93-
# backported, so as a workaround, we install that version manually
94-
sudo apt install -y mpich
95-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/mpich_4.2.0-5.1_amd64.deb'
96-
wget 'https://launchpad.net/ubuntu/+source/mpich/4.2.0-5.1/+build/28285882/+files/libmpich12_4.2.0-5.1_amd64.deb'
97-
sudo dpkg --install mpich_4.2.0-5.1_amd64.deb libmpich12_4.2.0-5.1_amd64.deb
98-
fi
84+
# Ubuntu 24.04: pin working mpich from ci/deps (no Launchpad download).
85+
# See ci/deps/README.md and LP#2072338.
86+
ci/deps/install_mpich_noble.sh
9987
displayName: 'Install Test System Dependencies'
10088
10189
- template: ci/azure-wheel-test-upload.yml

bin/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ include(CMakeListsNrnMech)
3838
# =============================================================================
3939
configure_file("nrngui.in" "nrngui" @ONLY)
4040
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sortspike ${CMAKE_CURRENT_BINARY_DIR}/sortspike COPYONLY)
41+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rdcellstate ${CMAKE_CURRENT_BINARY_DIR}/rdcellstate
42+
COPYONLY)
4143
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nrnivmodl_makefile_cmake.in
4244
${PROJECT_BINARY_DIR}/bin/nrnmech_makefile @ONLY)
4345
string(JOIN " " NRN_PYTHON_VERSIONS_STRING ${NRN_PYTHON_VERSIONS})
@@ -98,6 +100,7 @@ if(NRN_ENABLE_CORENEURON)
98100
endif()
99101

100102
install(FILES ${PROJECT_BINARY_DIR}/bin/nrnmech_makefile DESTINATION ${NRN_INSTALL_DATA_PREFIX}bin)
101-
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/sortspike ${CMAKE_CURRENT_SOURCE_DIR}/mkthreadsafe
102-
${PROJECT_BINARY_DIR}/bin/nrnpyenv.sh ${CMAKE_CURRENT_SOURCE_DIR}/set_nrnpyenv.sh
103-
DESTINATION ${NRN_INSTALL_DATA_PREFIX}bin)
103+
install(
104+
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/sortspike ${CMAKE_CURRENT_BINARY_DIR}/rdcellstate
105+
${CMAKE_CURRENT_SOURCE_DIR}/mkthreadsafe ${PROJECT_BINARY_DIR}/bin/nrnpyenv.sh
106+
${CMAKE_CURRENT_SOURCE_DIR}/set_nrnpyenv.sh DESTINATION ${NRN_INSTALL_DATA_PREFIX}bin)

bin/nrnivmodl.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ make -j 4 -f "${bindir}/nrnmech_makefile" "ROOT=${prefix}" "MODOBJFILES=$MODOBJS
287287
echo "Successfully created $MODSUBDIR/special"
288288
else
289289
printf "\nNOTE: If you are encountering MOD file compilation errors only with NEURON version 9.0 or later\n"
290-
printf "refer to the C++ migration guide at https://nrn.readthedocs.io/en/9.0.0/guide/porting_mechanisms_to_cpp.html\n\n"
290+
printf "refer to the C++ migration guide at https://www.neuronsimulator.org/en/9.0.0/guide/porting_mechanisms_to_cpp.html\n\n"
291291
fi
292292

293293
exit $MAKE_STATUS

bin/rdcellstate

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python3
2+
"""Thin CLI wrapper for neuron.debug.rdcellstate."""
3+
from neuron.debug.rdcellstate import main
4+
5+
raise SystemExit(main())

0 commit comments

Comments
 (0)