Skip to content

Commit

Permalink
Merge branch 'master' into cornu/clean_headers
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed Jul 6, 2023
2 parents 81f29b3 + 65efbdd commit a40e447
Show file tree
Hide file tree
Showing 87 changed files with 1,338 additions and 362 deletions.
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/release-patch.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Action items
Pre-release
---
- [ ] Create a cherrypicks branch where all commits go into new release and open a PR against `release/x.y` branch
- [ ] Create CoreNEURON tag on the `release/x.y` branch after cherrypicking required commits, update semantic version in its `CMakeLists.txt`, tag it & update submodule in cherrypicks PR
- [ ] Look out for ModelDB regressions by manually submitting and analyzing [nrn-modeldb-ci](https://github.com/neuronsimulator/nrn-modeldb-ci/actions/workflows/nrn-modeldb-ci.yaml?query=event%3Aschedule++) for the cherrypicks branch vs previous version
- [ ] Make sure to look out for ModelDB regressions by manually submitting and analyzing [nrn-modeldb-ci](https://github.com/neuronsimulator/nrn-modeldb-ci/actions/workflows/nrn-modeldb-ci.yaml?query=event%3Aschedule++) for the cherrypicks branch vs previous version
- [ ] Update cherrypicks PR:
- [ ] Update semantic version in `CMakeLists.txt`
- [ ] Update changelog below and agree on it with everyone; then commit it to `docs/changelog` in the cherrypicks PR (copy structure as-is)
Expand All @@ -25,20 +24,20 @@ 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)
- [ ] Activate ReadTheDocs build for `release/x.y` & make it hidden. Check docs are fine after build is done.
- [ ] Run BBP Simulation Stack, CoreNEURON CI & other relevant tests
- [ ] 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.
- [ ] 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
- [ ] 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
- [ ] Upload Windows installer from the wheels publishing Azure run (to get correct tag)
- [ ] 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)


Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ Action items

Pre-release
---
- [ ] Look out for ModelDB regressions by analyzing [nrn-modeldb-ci last version vs nightly reports](https://github.com/neuronsimulator/nrn-modeldb-ci/actions/workflows/nrn-modeldb-ci.yaml?query=event%3Aschedule++)
- [ ] Create CoreNEURON release branch, update semantic version in `CMakeLists.txt`, tag it & update submodule in NEURON
- [ ] Make sur to look out for ModelDB regressions by launching analyzing [nrn-modeldb-ci last version vs nightly reports](https://github.com/neuronsimulator/nrn-modeldb-ci/actions/workflows/nrn-modeldb-ci.yaml?query=event%3Aschedule++)

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)
- [ ] Activate ReadTheDocs build for `release/x.y` & make it hidden. Check docs are fine after build is done.
- [ ] Run BBP Simulation Stack, CoreNEURON CI & other relevant tests
- [ ] 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))


Expand All @@ -30,14 +29,15 @@ Releasing
- [ ] Update changelog below and agree on it with everyone; then commit it to `docs/changelog` (copy structure as-is)
- [ ] 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.
- [ ] Create, test and upload manual artifacts
- [ ] 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
- [ ] MacOS package installer (manual task, ask Michael)
- [ ] arm64 wheels (manual task, check with Alex or Pramod)
- [ ] aarch64 wheels (create a `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
- [ ] Upload Windows installer from the wheels publishing Azure run (to get correct tag)
- [ ] 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)


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

name: Code Coverage

timeout-minutes: 45
timeout-minutes: 60

env:
DISPLAY: ${{ ':0' }}
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
# By default we get a modern version of CMake that understands --parallel.
cmake --build . --parallel 2
cmake --build . --target cover_baseline
xvfb-run ctest -VV --output-on-failure;
xvfb-run ctest --rerun-failed --output-on-failure;
for python in "${PYTHON_MIN}" "${PYTHON_MAX}"
do
echo "Using ${python}"
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
name: tag-n-release ${{ github.event.inputs.rel_tag }} (${{ github.event.inputs.rel_branch }})
outputs:
release_url: ${{ steps.create_release.outputs.upload_url }}
rel_tag: ${{ env.REL_TAG }}
steps:
- uses: actions/checkout@v3
name: Checkout branch ${{ env.REL_BRANCH }}
Expand Down Expand Up @@ -74,15 +75,17 @@ jobs:
- name: Create full-src-package
id: tar
run: |
tar -czvf ${REL_TAG}.tar.gz nrn
echo "asset_file=${REL_TAG}.tar.gz" >> $GITHUB_OUTPUT
tar -czvf full-src-package-${REL_TAG}.tar.gz nrn
echo "asset_file=full-src-package-${REL_TAG}.tar.gz" >> $GITHUB_OUTPUT
- name: Upload full-src-package to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ needs.tag-n-release.outputs.release_url }}
asset_name: ${{ github.job }}-${{ steps.tar.outputs.asset_file }}
asset_content_type: application/gzip
asset_path: ${{ steps.tar.outputs.asset_file }}
run: |
gh release upload ${{ needs.tag-n-release.outputs.rel_tag }} ${{ steps.tar.outputs.asset_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

windows-installer:
needs: tag-n-release
uses: neuronsimulator/nrn/.github/workflows/windows.yml@master
with:
tag: ${{ needs.tag-n-release.outputs.rel_tag }}
18 changes: 17 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ concurrency:
cancel-in-progress: true

on:
workflow_call:
inputs:
tag:
description: 'Release version (tag name)'
default: ''
required: true
type: string
push:
branches:
- master
- release/**
pull_request:
branches:
Expand All @@ -28,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.tag }}

- name: Retrieve rxd test data
run: |
Expand Down Expand Up @@ -84,3 +92,11 @@ jobs:
run: .\ci\win_test_installer.cmd
shell: cmd
working-directory: ${{runner.workspace}}\nrn

- name: Publish Release Installer
working-directory: ${{runner.workspace}}\nrn
if: inputs.tag != ''
run: |
gh release upload ${{ inputs.tag }} nrn-nightly-AMD64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ if(NRN_ENABLE_CORENEURON)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/coreneuron
${PROJECT_SOURCE_DIR}/cmake/coreneuron/packages)

set(nrn_using_ext_corenrn FALSE)
# If NEURON tests are enabled then enable CoreNEURON tests too
set(CORENRN_ENABLE_UNIT_TESTS
${NRN_ENABLE_TESTS}
Expand Down Expand Up @@ -567,6 +566,7 @@ endif()
# =============================================================================
# Add project directories AFTER CMake modules
# =============================================================================
add_subdirectory(src/gnu)
add_subdirectory(src/nrniv)

# Collect the environment variables that are needed to execute NEURON from the build directory. This
Expand Down
36 changes: 0 additions & 36 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,42 +150,6 @@ stages:
- template: ci/azure-wheel-test-upload.yml


# Jobs to build NEURON installer natively
- job: 'WindowsInstaller'
timeoutInMinutes: 45
pool:
vmImage: windows-latest
variables:
MSYS2_ROOT: C:\msys64

steps:
- checkout: self
submodules: 'true'
clean: 'true'

- task: BatchScript@1
inputs:
filename: ci/win_download_deps.cmd
displayName: "Download Dependencies"
condition: succeeded()

- task: BatchScript@1
inputs:
filename: ci/win_install_deps.cmd
displayName: "Install Dependencies"
condition: succeeded()

# WSL is enabled by default in the image, with no installed linux distribution.
# WSL creates an unusable `bash.EXE` that can be resolved first from the environment.
# This is why we remove that file.
- script: |
rm.exe "C:/WINDOWS/system32/bash.EXE"
%MSYS2_ROOT%\usr\bin\bash -lc "$BUILD_SOURCESDIRECTORY/ci/win_build_cmake.sh"
displayName: "Build and Create Installer"
condition: succeeded()
- template: ci/azure-win-installer-upload.yml

- stage: Final
jobs:
- job: AzureDropURL
Expand Down
44 changes: 0 additions & 44 deletions ci/azure-win-installer-upload.yml

This file was deleted.

19 changes: 0 additions & 19 deletions cmake/NeuronFileLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -444,24 +444,6 @@ set(SCOPMATH_FILES_LIST

set(NRNMPI_FILES_LIST nrnmpi.cpp bbsmpipack.cpp mpispike.cpp)

set(NRNGNU_FILES_LIST
ACG.cpp
Binomial.cpp
DiscUnif.cpp
Erlang.cpp
Geom.cpp
HypGeom.cpp
LogNorm.cpp
MLCG.cpp
NegExp.cpp
Normal.cpp
Poisson.cpp
RNG.cpp
Random.cpp
RndInt.cpp
Uniform.cpp
Weibull.cpp)

# nrnpython sources (only if ${NRN_ENABLE_PYTHON_DYNAMIC} is OFF}
set(NRNPYTHON_FILES_LIST
nrnpython.cpp
Expand Down Expand Up @@ -570,7 +552,6 @@ nrn_create_file_list(NRN_SPARSE13_SRC_FILES ${PROJECT_SOURCE_DIR}/src/sparse13
nrn_create_file_list(NRN_SCOPMATH_SRC_FILES ${PROJECT_SOURCE_DIR}/src/scopmath
${SCOPMATH_FILES_LIST})
nrn_create_file_list(NRN_NRNMPI_SRC_FILES ${PROJECT_SOURCE_DIR}/src/nrnmpi ${NRNMPI_FILES_LIST})
nrn_create_file_list(NRN_NRNGNU_SRC_FILES ${PROJECT_SOURCE_DIR}/src/gnu ${NRNGNU_FILES_LIST})
nrn_create_file_list(NRN_NRNPYTHON_SRC_FILES ${PROJECT_SOURCE_DIR}/src/nrnpython
${NRNPYTHON_FILES_LIST})
nrn_create_file_list(NRN_MODFILE_BASE_NAMES src/nrnoc ${MODFILE_BASE_NAMES})
Expand Down
4 changes: 2 additions & 2 deletions docs/courses/intro_to_gui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Halve the duration and double the amplitude.
Change the number of Points plotted/ms to 100 and dt to 0.01 ms and run again.

5.
**Increase the amplitude to 1e4 nA, cut the duration to 1e-5 ms, inrease Points plotted/ms to 1e5, and start a simulation...**
**Increase the amplitude to 1e4 nA, cut the duration to 1e-5 ms, increase Points plotted/ms to 1e5, and start a simulation...**

After a few seconds of eternity, stop the simulation by clicking on RunControl / stop

Expand All @@ -242,7 +242,7 @@ Halve the duration and double the amplitude.

:download:`bilayer.hoc <code/bilayer.hoc>` contains a properly configured CellBuilder, plus a custom interface for running simulations. The one item it doesn't have is a VariableStepControl.

:download:`bilayer.hoc <code/bilayer.hoc>` is actually a session file that was given the "hoc" extension so that MSWin users could launch it by double clickin on the file name. For didactic reasons we prefer that you load it from Python instead.
:download:`bilayer.hoc <code/bilayer.hoc>` is actually a session file that was given the "hoc" extension so that MSWin users could launch it by double clicking on the file name. For didactic reasons we prefer that you load it from Python instead.

1.
Save :download:`bilayer.hoc <code/bilayer.hoc>` to your machine, open up in a terminal, then cd to the directory that contains bilayer.hoc
Expand Down
2 changes: 1 addition & 1 deletion docs/courses/multithread_parallelization.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _multithread_parallelization:

Multithreaded paralellization
Multithreaded parallelization
=============================

If a model has more than a few thousand states, it may run faster with multiple threads.
Expand Down
2 changes: 1 addition & 1 deletion docs/dealing_simulations_generate_lot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The answer to your problem is to break the simulation into shorter segments, eac
Comments and suggestions
-------------

As always, these examples illustrate modular code organization, and iterative refinement and testing of code, both of which are useful strategies for productive programming. If you run into keywords that are new to you, or unfamilar usage of familiar keywords, be sure to look them up in the :ref:`programmer's reference <python_prog_ref>`.
As always, these examples illustrate modular code organization, and iterative refinement and testing of code, both of which are useful strategies for productive programming. If you run into keywords that are new to you, or unfamiliar usage of familiar keywords, be sure to look them up in the :ref:`programmer's reference <python_prog_ref>`.
Loading

0 comments on commit a40e447

Please sign in to comment.