Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Oct 4, 2023
2 parents 0befaac + d9855f6 commit efdaaa8
Show file tree
Hide file tree
Showing 76 changed files with 966 additions and 914 deletions.
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/release-patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,32 @@ Pre-release
Sanity checks
---
- [ ] After cherrypicks PR is merged, make sure GitHub, Azure and CircleCI builds pass for `release/x.y` branch
- [ ] Run [nrn-build-ci](https://github.com/neuronsimulator/nrn-build-ci/actions/workflows/build-neuron.yml) for the `release/x.y` branch; see [nrn-build-ci guide](https://github.com/neuronsimulator/nrn-build-ci#azure-wheels-testing---manual-workflow)
- [ ] Run [nrn-build-ci](https://github.com/neuronsimulator/nrn-build-ci/actions/workflows/build-neuron.yml) for the `release/x.y` branch; see [nrn-build-ci guide](https://github.com/neuronsimulator/nrn-build-ci#azure-wheels-testing---manual-workflow)
- [ ] Activate ReadTheDocs build for `release/x.y` & make it hidden. Check docs are fine after build is done.
- [ ] Run BBP Simulation Stack & other relevant tests
- [ ] Build release wheels but WITHOUT upload ([see details](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-azure))


Releasing
---
- [ ] Create new release+tag on GitHub via [release workflow](https://github.com/neuronsimulator/nrn/actions/workflows/release.yml?query=workflow%3A%22NEURON+Release%22). Note that the GitHub release will be marked as pre-release and will contain the full-src-package and the Windows installer at the end of the release workflow.
- [ ] Create, test and upload manual artifacts
- [ ] Build release wheels but WITHOUT upload ([see details](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-azure))
- [ ] Create, test and upload manual artifacts
- [ ] MacOS package installer (manual task, ask Michael)
- [ ] arm64 wheels (manual task, check with Alex or Pramod)
- [ ] aarch64 wheels (use existing `release/x.y-aarch64` branch for this, see [guide](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-circleci))
- [ ] Publish the `x.y.z` wheels on PyPI; see [wheel publishing instructions](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-azure)
- [ ] Once wheels are published, activate the `x.y.z` tag on ReadTheDocs
- [ ] Rename the Windows installer in the GitHub release to match the new version and the supported python versions (i.e. `nrn-8.2.2.w64-mingw-py-37-38-39-310-311-setup.exe`)
- [ ] Publish release on GitHub (edit https://github.com/neuronsimulator/nrn/releases/tag/x.y.z and un-tick the pre-release checkbox)
- [ ] Publish release on GitHub (edit https://github.com/neuronsimulator/nrn/releases/tag/x.y.z and un-tick the pre-release checkbox)


Post-release
---
- [ ] Deactivate ReadTheDocs build for `release/x.y`
- [ ] Go to [ReadTheDocs advanced settings](https://readthedocs.org/dashboard/nrn/advanced/) and set `Default version` to `x.y.z`
- [ ] Go to [ReadTheDocs advanced settings](https://readthedocs.org/dashboard/nrn/advanced/) and set `Default version` to `x.y.z`
- [ ] Let people know :rocket:
- [ ] Cherrypick changelog and installer links to `master`
- [ ] Update the changelog for the release on GitHub


Changelog
Expand Down
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ Pre-release
Sanity checks
---
- [ ] Create `release/x.y` branch and make sure GitHub, Azure and CircleCI builds pass
- [ ] Run [nrn-build-ci](https://github.com/neuronsimulator/nrn-build-ci/actions/workflows/build-neuron.yml) for the respective Azure build; see [Azure drop guide](https://github.com/neuronsimulator/nrn-build-ci#azure-wheels-testing---manual-workflow)
- [ ] Run [nrn-build-ci](https://github.com/neuronsimulator/nrn-build-ci/actions/workflows/build-neuron.yml) for the respective Azure build; see [Azure drop guide](https://github.com/neuronsimulator/nrn-build-ci#azure-wheels-testing---manual-workflow)
- [ ] Activate ReadTheDocs build for `release/x.y` & make it hidden. Check docs are fine after build is done.
- [ ] Run BBP Simulation Stack & other relevant tests
- [ ] Build release wheels but WITHOUT upload ([see details](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-azure))


Releasing
Expand All @@ -30,6 +29,7 @@ Releasing
- [ ] Update `docs/index.rst` accordingly with the new `.pkg` and `.exe` links for `PKG installer` and `Windows Installer`
- [ ] Run the ReadTheDocs build again for `release-x.y`, make sure the build passes and inspect the Changelog page.
- [ ] Create new release+tag on GitHub via [release workflow](https://github.com/neuronsimulator/nrn/actions/workflows/release.yml?query=workflow%3A%22NEURON+Release%22). Note that the GitHub release will be marked as pre-release and will contain the full-src-package and the Windows installer at the end of the release workflow.
- [ ] Build release wheels but WITHOUT upload ([see details](https://nrn.readthedocs.io/en/latest/install/python_wheels.html#publishing-the-wheels-on-pypi-via-azure))
- [ ] Create, test and upload manual artifacts
- [ ] MacOS package installer (manual task, ask Michael)
- [ ] arm64 wheels (manual task, check with Alex or Pramod)
Expand All @@ -44,12 +44,13 @@ Releasing
Post-release
---
- [ ] To mark the start of a new development cycle, tag `master` as follows:
- minor version: `x.(y+1).dev`
- minor version: `x.(y+1).dev`
- major version: `(x+1).0.dev`
- [ ] Deactivate ReadTheDocs build for `release/x.y`
- [ ] Go to [ReadTheDocs advanced settings](https://readthedocs.org/dashboard/nrn/advanced/) and set `Default version` to `x.y.z`
- [ ] Go to [ReadTheDocs advanced settings](https://readthedocs.org/dashboard/nrn/advanced/) and set `Default version` to `x.y.z`
- [ ] Let people know :rocket:
- [ ] Cherrypick changelog and installer links to `master`
- [ ] Update the changelog for the release on GitHub

Changelog
======
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ favor of Python. The hoc code itself is in the nrn repository and also should no

There are several NEURON-related repositories hosted elsewhere which also encourage contributions. Each of these will have its own *Contributing* document.
1. [NMODL](https://github.com/BlueBrain/nmodl) -- improved method for compiling and porting *.mod* files using *abstract syntax trees*
1. [CoreNEURON](https://github.com/BlueBrain/CoreNeuron) -- an optimized NEURON for running on high performance computers (HPCs)
1. [CoreNEURON](https://github.com/neuronsimulator/nrn/tree/master/src/coreneuron) -- an optimized NEURON for running on high performance computers (HPCs)
1. [NetPyNE](https://github.com/Neurosim-lab/netpyne) -- multiscale modeling tool for developing, simulating and analyzing networks which include complex cells, potentially
with detailed molecular-modeling.
1. [NetPyNE-UI](https://github.com/MetaCell/NetPyNE-UI) -- graphical user interface for NetPyNE
Expand Down
46 changes: 46 additions & 0 deletions build_osx_wheels.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

# This script assumes that you have the prerequisites already installed
# See https://nrn.readthedocs.io/en/latest/install/python_wheels.html#installing-macos-prerequisites
#
# If you want the script to check the nrniv output (for version string checking), set the following environment variable
# Note that this will require manual intervention during script execution
#
# export INTERACTIVE_OK=yes

set -x

export BREW_PREFIX=$(brew --prefix)
export PATH=/opt/homebrew/opt/bison/bin:/opt/homebrew/opt/flex/bin:$PATH

export NRN_RELEASE_UPLOAD=false
export NRN_NIGHTLY_UPLOAD=false
export NEURON_NIGHTLY_TAG=""

export SKIP_EMBEDED_PYTHON_TEST=true

if [ -n $1 ]
then
# example: 9.0a
export SETUPTOOLS_SCM_PRETEND_VERSION=$1
fi

set -e

packaging/python/build_wheels.bash osx 3.9 coreneuron &>3.9-output
packaging/python/build_wheels.bash osx 3.10 coreneuron &>3.10-output
packaging/python/build_wheels.bash osx 3.11 coreneuron &>3.11-output

if [ -n $INTERACTIVE_OK ]
then
for py in 9 10 11
do
python3.${py} -m venv venv3.${py}
venv3.${py}/bin/pip install wheelhouse/NEURON-${1}-cp3${py}-cp3${py}-macosx_11_0_arm64.whl
venv3.${py}/bin/nrniv
done
fi

bash packaging/python/test_wheels.sh python3.9 wheelhouse/NEURON-*-cp39*.whl true &>3.9-test-output
bash packaging/python/test_wheels.sh python3.10 wheelhouse/NEURON-*-cp310*.whl true &>3.10-test-output
bash packaging/python/test_wheels.sh python3.11 wheelhouse/NEURON-*-cp311*.whl true &>3.11-test-output
8 changes: 8 additions & 0 deletions ci/win_install_deps.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ if "%MSYS2_ROOT%"=="" set MSYS2_ROOT=C:\msys64
if not exist "%MSYS2_ROOT%\usr\bin\bash.exe" (
choco install -y --no-progress msys2 --params="/InstallDir:%MSYS2_ROOT% /NoUpdate /NoPath" || goto :error
)

:: With upgrade of Azure CI runner image on 21st of Sept 2023,
:: choco brings mingw 12.2.0 and it's somehow incompatible with
:: msys+neuron installation. So for now, just use previously working
:: version of mingw
choco uninstall -y mingw
choco install --allow-downgrade -y mingw --version=11.2.0

set PATH=%MSYS2_ROOT%\usr\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%PATH%

:: update pacman cache (sometimes required when new GH/Azure runner images are deployed)
Expand Down
78 changes: 14 additions & 64 deletions cmake/ConfigFileSetting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,14 @@ nrn_set_string(PACKAGE_VERSION "${PROJECT_VERSION}")
nrn_set_string(VERSION "${PROJECT_VERSION}")
nrn_set_string(NRN_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
nrn_set_string(NEURON_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/nrn")
nrn_set_string(LT_OBJDIR ".libs/")
nrn_set_string(DLL_DEFAULT_FNAME "${CMAKE_SYSTEM_PROCESSOR}/.libs/libnrnmech.so")

# indicate nmodl config is used
add_definitions(-DHAVE_CONFIG_H)

set(YYTEXT_POINTER 1)
set(TIME_WITH_SYS_TIME 1)
set(HAVE_NAMESPACES "/**/")
set(HAVE_STTY 0)
# below two are universal nowadays
set(IVOS_FABS "::fabs")
set(prefix ${CMAKE_INSTALL_PREFIX})
set(host_cpu ${CMAKE_SYSTEM_PROCESSOR})
set(exec_prefix ${prefix})
Expand Down Expand Up @@ -145,83 +141,44 @@ set(SUNDIALS_USE_GENERIC_MATH 1)
# =============================================================================
# Similar to check_include_files but also construct NRN_HEADERS_INCLUDE_LIST
# =============================================================================
nrn_check_include_files(alloca.h HAVE_ALLOCA_H)
nrn_check_include_files(dlfcn.h HAVE_DLFCN_H)
nrn_check_include_files(execinfo.h HAVE_EXECINFO_H)
nrn_check_include_files(fcntl.h HAVE_FCNTL_H)
nrn_check_include_files(fenv.h HAVE_FENV_H)
nrn_check_include_files(float.h HAVE_FLOAT_H)
nrn_check_include_files(inttypes.h HAVE_INTTYPES_H)
nrn_check_include_files(limits.h HAVE_LIMITS_H)
nrn_check_include_files(locale.h HAVE_LOCALE_H)
nrn_check_include_files(malloc.h HAVE_MALLOC_H)
nrn_check_include_files(math.h HAVE_MATH_H)
nrn_check_include_files(memory.h HAVE_MEMORY_H)
nrn_check_include_files(sgtty.h HAVE_SGTTY_H)
nrn_check_include_files(stdarg.h HAVE_STDARG_H)
nrn_check_include_files(stdint.h HAVE_STDINT_H)
nrn_check_include_files(stdlib.h HAVE_STDLIB_H)
nrn_check_include_files(stream.h HAVE_STREAM_H)
nrn_check_include_files(strings.h HAVE_STRINGS_H)
nrn_check_include_files(string.h HAVE_STRING_H)
nrn_check_include_files(stropts.h HAVE_STROPTS_H)
nrn_check_include_files(sys/conf.h HAVE_SYS_CONF_H)
nrn_check_include_files(sys/file.h HAVE_SYS_FILE_H)
nrn_check_include_files(sys/ioctl.h HAVE_SYS_IOCTL_H)
nrn_check_include_files(sys/stat.h HAVE_SYS_STAT_H)
nrn_check_include_files(sys/time.h HAVE_SYS_TIME_H)
nrn_check_include_files(sys/types.h HAVE_SYS_TYPES_H)
nrn_check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
nrn_check_include_files(termio.h HAVE_TERMIO_H)
nrn_check_include_files(unistd.h HAVE_UNISTD_H)
nrn_check_include_files(varargs.h HAVE_VARARGS_H)
nrn_check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H)

# =============================================================================
# Check for standard headers
# =============================================================================
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h"
STDC_HEADERS)
check_include_file_cxx("_G_config.h" HAVE__G_CONFIG_H)

# =============================================================================
# Check symbol using check_cxx_symbol_exists but use ${NRN_HEADERS_INCLUDE_LIST}
# =============================================================================
# note that this must be called after all *check_include_files because we use
# NRN_HEADERS_INCLUDE_LIST is second argument (headers) is empty.
nrn_check_symbol_exists("alloca" "" HAVE_ALLOCA)
nrn_check_symbol_exists("bcopy" "" HAVE_BCOPY)
nrn_check_symbol_exists("bzero" "" HAVE_BZERO)
nrn_check_symbol_exists("doprnt" "" HAVE_DOPRNT)
nrn_check_symbol_exists("ftime" "" HAVE_FTIME)
nrn_check_symbol_exists("getcwd" "" HAVE_GETCWD)
nrn_check_symbol_exists("gethostname" "" HAVE_GETHOSTNAME)
nrn_check_symbol_exists("gettimeofday" "" HAVE_GETTIMEOFDAY)
nrn_check_symbol_exists("index" "" HAVE_INDEX)
nrn_check_symbol_exists("isatty" "" HAVE_ISATTY)
nrn_check_symbol_exists("bcopy" "strings.h" HAVE_BCOPY)
nrn_check_symbol_exists("bzero" "strings.h" HAVE_BZERO)
nrn_check_symbol_exists("gettimeofday" "sys/time.h" HAVE_GETTIMEOFDAY)
nrn_check_symbol_exists("index" "strings.h" HAVE_INDEX)
nrn_check_symbol_exists("isatty" "unistd.h" HAVE_ISATTY)
nrn_check_symbol_exists("iv" "" HAVE_IV)
nrn_check_symbol_exists("lockf" "" HAVE_LOCKF)
nrn_check_symbol_exists("mallinfo" "" HAVE_MALLINFO)
nrn_check_symbol_exists("mallinfo2" "" HAVE_MALLINFO2)
nrn_check_symbol_exists("mkdir" "" HAVE_MKDIR)
nrn_check_symbol_exists("mkstemp" "" HAVE_MKSTEMP)
nrn_check_symbol_exists("namespaces" "" HAVE_NAMESPACES)
nrn_check_symbol_exists("posix_memalign" "" HAVE_POSIX_MEMALIGN)
nrn_check_symbol_exists("realpath" "" HAVE_REALPATH)
nrn_check_symbol_exists("select" "" HAVE_SELECT)
nrn_check_symbol_exists("setenv" "" HAVE_SETENV)
nrn_check_symbol_exists("setitimer" "" HAVE_SETITIMER)
nrn_check_symbol_exists("mallinfo" "malloc.h" HAVE_MALLINFO)
nrn_check_symbol_exists("mallinfo2" "malloc.h" HAVE_MALLINFO2)
nrn_check_symbol_exists("mkstemp" "stdlib.h" HAVE_MKSTEMP)
nrn_check_symbol_exists("posix_memalign" "stdlib.h" HAVE_POSIX_MEMALIGN)
nrn_check_symbol_exists("realpath" "stdlib.h" HAVE_REALPATH)
nrn_check_symbol_exists("setenv" "stdlib.h" HAVE_SETENV)
nrn_check_symbol_exists("setitimer" "sys/time.h" HAVE_SETITIMER)
nrn_check_symbol_exists("sigaction" "signal.h" HAVE_SIGACTION)
nrn_check_symbol_exists("sigprocmask" "signal.h" HAVE_SIGPROCMASK)
nrn_check_symbol_exists("SIGBUS" "signal.h" HAVE_SIGBUS)
nrn_check_symbol_exists("SIGSEGV" "signal.h" HAVE_SIGSEGV)
nrn_check_symbol_exists("strdup" "" HAVE_STRDUP)
nrn_check_symbol_exists("strstr" "" HAVE_STRSTR)
nrn_check_symbol_exists("stty" "" HAVE_STTY)
nrn_check_symbol_exists("vprintf" "" HAVE_VPRINTF)
nrn_check_cxx_symbol_exists("getpw" "sys/types.h;pwd.h" HAVE_GETPW)
nrn_check_cxx_symbol_exists("fesetround" "" HAVE_FESETROUND)
nrn_check_cxx_symbol_exists("feenableexcept" "" HAVE_FEENABLEEXCEPT)
nrn_check_cxx_symbol_exists("fesetround" "fenv.h" HAVE_FESETROUND)
nrn_check_cxx_symbol_exists("feenableexcept" "fenv.h" HAVE_FEENABLEEXCEPT)

# =============================================================================
# Check data types
Expand All @@ -240,13 +197,7 @@ nrn_check_signal_return_type(RETSIGTYPE)
# =============================================================================
# Check direcotry manipulation header
# =============================================================================
nrn_check_dir_exists(dirent.h HAVE_DIRENT_H)
nrn_check_dir_exists(ndir.h HAVE_NDIR_H)
nrn_check_dir_exists(sys/dir.h HAVE_SYS_DIR_H)
nrn_check_dir_exists(sys/ndir.h HAVE_SYS_NDIR_H)
if(HAVE_DIRENT_H)
set(HAVE_SYS_DIR_H 0)
endif()

# =============================================================================
# Copy cmake specific template files
Expand All @@ -266,7 +217,6 @@ nrn_configure_dest_src(nrnconf.h . cmake_nrnconf.h .)
nrn_configure_dest_src(nmodlconf.h . cmake_nrnconf.h .)
nrn_configure_file(nrnmpiuse.h src/oc)
nrn_configure_file(nrnconfigargs.h src/nrnoc)
nrn_configure_file(bbsconf.h src/parallel)
nrn_configure_file(nrnneosm.h src/nrncvode)
nrn_configure_file(sundials_config.h src/sundials)
nrn_configure_dest_src(nrnunits.lib share/nrn/lib nrnunits.lib share/lib)
Expand Down
Loading

0 comments on commit efdaaa8

Please sign in to comment.