Skip to content

Commit

Permalink
Merge branch 'master' into docs/project-management
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodk authored Jan 27, 2024
2 parents 435eeef + 638c30c commit d1fc3d9
Show file tree
Hide file tree
Showing 2,331 changed files with 290,126 additions and 214,309 deletions.
14 changes: 14 additions & 0 deletions .bbp-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tools:
Black:
enable: True
include:
match:
- '.*\.(py|ipynb)$'
option: [--color, --target-version, py37]
version: '[jupyter] ~=22.3'
ClangFormat:
enable: True
version: == 12.0.1
CMakeFormat:
enable: True
version: == 0.6.13
107 changes: 107 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
version: 2.1

orbs:
python: circleci/[email protected]

jobs:
manylinux2014-aarch64:

parameters:
NRN_PYTHON_VERSION:
type: string
NRN_NIGHTLY_UPLOAD:
type: string

machine:
image: default

resource_class: arm.medium

steps:
- checkout
- run:
name: Build manylinux AArch64 wheel
command: |
docker run --rm \
-w /root/nrn \
-v $PWD:/root/nrn \
-v /opt/nrnwheel/mpt:/nrnwheel/mpt \
-e NEURON_NIGHTLY_TAG \
-e NRN_NIGHTLY_UPLOAD \
-e NRN_RELEASE_UPLOAD \
-e SETUPTOOLS_SCM_PRETEND_VERSION \
-e NRN_BUILD_FOR_UPLOAD=1 \
'neuronsimulator/neuron_wheel:latest-gcc9-aarch64' \
packaging/python/build_wheels.bash linux << parameters.NRN_PYTHON_VERSION >> coreneuron
- store_artifacts:
path: ./wheelhouse
destination: artifacts

- run:
name: Test manylinux AArch64 wheel
command: |
# install mpi dependencies
sudo apt update
sudo apt install -y mpich openmpi-bin libopenmpi-dev libmpich-dev
# choose available python versions from pyenv
pyenv_py_ver=""
case << parameters.NRN_PYTHON_VERSION >> in
38) pyenv_py_ver="3.8" ;;
39) pyenv_py_ver="3.9" ;;
310) pyenv_py_ver="3.10" ;;
311) pyenv_py_ver="3.11" ;;
312) pyenv_py_ver="3.12" ;;
*) echo "Error: pyenv python version not specified!" && exit 1;;
esac
cd /opt/circleci/.pyenv/plugins/python-build/../.. && git fetch --all && git checkout -B master origin/master && cd -
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $pyenv_py_ver --force
pyenv global $pyenv_py_ver
export PYTHON_EXE=$(which python)
# test wheel
packaging/python/test_wheels.sh $PYTHON_EXE $(ls -t wheelhouse/*.whl)
- run:
name: Upload nightly wheel to pypi.org
command: |
if [ "<< parameters.NRN_NIGHTLY_UPLOAD >>" == "true" ]; then
python -m pip install --upgrade pip
python -m pip install twine
python -m twine upload --verbose --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD wheelhouse/*.whl
else
echo "Skipping pypi.org upload!"
fi
workflows:

build-workflow:
jobs:
- manylinux2014-aarch64:
filters:
branches:
only:
- /release\/.*/
- /circleci\/.*/
matrix:
parameters:
NRN_PYTHON_VERSION: ["312"]
NRN_NIGHTLY_UPLOAD: ["false"]

nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- manylinux2014-aarch64:
matrix:
parameters:
NRN_PYTHON_VERSION: ["38", "39", "310", "311", "312"]
NRN_NIGHTLY_UPLOAD: ["true"]
11 changes: 10 additions & 1 deletion .clang-format.changes
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
SortIncludes: false
Standard: Cpp03
Standard: c++17
StatementMacros: [MKDLL, MKDLLdec, MKDLLif, MKDLLvp, MKDLLvpf, MUTDEC, PyObject_HEAD,
declareActionCallback, declareAdjustStepper, declareArrowGlyph, declareFieldEditorCallback,
declareFieldSEditorCallback, declareFileChooserCallback, declareIOCallback, declareList,
declarePtrList, declareRubberCallback, declareSelectionCallback, declareTable, declareTable2,
HocContextRestore, HocTopContextSet,
implementActionCallback, implementAdjustStepper, implementArrowGlyph, implementFieldEditorCallback,
implementFieldSEditorCallback, implementFileChooserCallback, implementIOCallback, implementList,
implementPtrList, implementRubberCallback, implementSelectionCallback, implementTable,
implementTable2, nrn_pragma_acc, nrn_pragma_omp, TBUF]
27 changes: 16 additions & 11 deletions .cmake-format.changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@ additional_commands:
nrn_add_test_group:
pargs: 0
kwargs:
CORENEURON: 0
ENVIRONMENT: '+'
NAME: 1
SUBMODULE: '?'
MODFILE_PATTERNS: '*'
SCRIPT_PATTERNS: '*'
OUTPUT: '*'
MODFILE_PATTERNS: '+'
NRNIVMODL_ARGS: '+'
OUTPUT: '+'
SCRIPT_PATTERNS: '+'
SIM_DIRECTORY: 1
SUBMODULE: 1
nrn_add_test:
pargs: 0
kwargs:
GROUP: 1
NAME: 1
SUBMODULE: '?'
MODFILE_PATTERNS: '*'
PRECOMMAND: '+'
COMMAND: '+'
SCRIPT_PATTERNS: '*'
REQUIRES: '*'
CONFLICTS: '*'
ENVIRONMENT: '+'
CONFLICTS: '+'
PRECOMMAND: '+'
PRELOAD_SANITIZER: 0
PROCESSORS: 1
REQUIRES: '+'
OUTPUT: '*'
PROCESSORS: '?'
SCRIPT_PATTERNS: '*'
SIM_DIRECTORY: '?'
nrn_add_test_group_comparison:
pargs: 0
kwargs:
Expand Down
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# Ignore blame of black formatting
4c6fd585f2d6138db5f77513a795a53cc56b0646
# Ignore blame of black formatting fixup #1729
d65a7083dbc54bede71aaf37c91677c8ce1f089d
# Ignore blame of cmake-format formatting #1730
c5d0fc9499c22b947d76b65dfa756be154b93f18
# Ignore blame of clang-format formatting #1732
013b69a92bcbd09d917e5519940f75c511ed5072
# Ignore blame of extra clang-format formatting #1748
4d9a02539d13636c8e27cc123846072837d760be
96 changes: 96 additions & 0 deletions .github/ISSUE_TEMPLATE/release-patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
name: NEURON Patch Release
about: Create a NEURON Patch release for an existing branch.
title: 'NEURON [x.y.z] patch release'
labels: 'release'
assignees: ''

---

Action items
============

Pre-release
---
- [ ] Create a cherrypicks branch where all commits go into new release and open a PR against `release/x.y` branch
- [ ] 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)
- [ ] Update `docs/index.rst` accordingly with the new `.pkg` and `.exe` links for `PKG installer` and `Windows Installer`

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 & other relevant tests


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.
- [ ] 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)


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`
- [ ] Let people know :rocket:
- [ ] Cherrypick changelog and installer links to `master`
- [ ] Update the changelog for the release on GitHub


Changelog
======

# NEURON X.Y

## [x.y.z]
_Release Date_ : DD-MM-YYYY


### What's New
* [List new features/support added]
* .....


### Bug Fixes
* [List the important bug fixes]
* ...


### Improvements / Other Changes
* [List the improvements made in the new release and any other changes]
* ...


For the complete list of commits check [GitHub Issue #[GH_no.]](https://github.com/neuronsimulator/nrn/issues/#[GH_no.])

ReadTheDocs sneak peek
======================
* https://nrn.readthedocs.io/en/release-x.y

Commits going into x.y.z
========================

[given `a.b.c` is the last release:]

Since [a.b.c], with:
```bash
git log --pretty=format:"%h : %s" a.b.c..release/x.y
```
we get:

- [ ] commit 1
- [ ] commit 2
- [ ] ...
110 changes: 110 additions & 0 deletions .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: NEURON Major/Minor Release
about: Create a NEURON release for a new branch from master.
title: 'NEURON [x.y.z] release'
labels: 'release'
assignees: ''

---

Action items
============

Pre-release
---
- [ ] 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 & other relevant tests


Releasing
---
- [ ] Update semantic version in `CMakeLists.txt`
- [ ] 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 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)
- [ ] 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
- [ ] 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)


Post-release
---
- [ ] To mark the start of a new development cycle, tag `master` as follows:
- 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`
- [ ] Let people know :rocket:
- [ ] Cherrypick changelog and installer links to `master`
- [ ] Update the changelog for the release on GitHub

Changelog
======

# NEURON X.Y

## [x.y.z]
_Release Date_ : DD-MM-YYYY


### What's New
* [List new features/support added]
* .....

### Breaking Changes
* [List the changes that aren't backward compatible]
* ...


### Deprecations
* [List the features that are deprecated]
* ...


### Bug Fixes
* [List the important bug fixes]
* ...


### Improvements / Other Changes
* [List the improvements made in the new release and any other changes]
* ...

### Upgrade Steps
* [Describe how to migrate from previous NEURON Version]
* ...

For the complete list of features and bug fixes, see the list in [GitHub Issue #[GH_no.]](https://github.com/neuronsimulator/nrn/issues/#[GH_no.])

ReadTheDocs sneak peek
======================
* https://nrn.readthedocs.io/en/release-x.y

Commits going into x.y.z
========================

[given `a.b.c` is the last release:]

Since [a.b.c], with:
```bash
git log --pretty=format:"%h : %s" a.b.c..release/x.y
```
we get:

- [ ] commit 1
- [ ] commit 2
- [ ] ...
Loading

0 comments on commit d1fc3d9

Please sign in to comment.