Skip to content

Commit

Permalink
Merge branch 'master' into 1uc/fix-nrn_thread_free
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodk authored Sep 27, 2023
2 parents e2de83f + ff55f81 commit 36f59bc
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 18 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
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
2 changes: 1 addition & 1 deletion cmake_nrnconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
#include <string_view>
namespace neuron::config {
#ifdef USE_PYTHON
constexpr std::string_view default_python_executable{"@NRN_DEFAULT_PYTHON_EXECUTABLE@"};
constexpr std::string_view default_python_executable{R"(@NRN_DEFAULT_PYTHON_EXECUTABLE@)"};
constexpr std::array<std::string_view, @NRN_PYTHON_COUNT@> supported_python_versions{@NRN_DYNAMIC_PYTHON_LIST_OF_VERSION_STRINGS@};
#endif
constexpr std::string_view shared_library_prefix{"@CMAKE_SHARED_LIBRARY_PREFIX@"};
Expand Down
2 changes: 1 addition & 1 deletion external/iv
18 changes: 11 additions & 7 deletions src/ivoc/xmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1986,15 +1986,16 @@ void HocValEditor::evalField() {
}

void HocValEditor::audit() {
char buf[200];
auto sout = std::stringstream{};
if (pyvar_) {
return;
} else if (variable_) {
Sprintf(buf, "%s = %s\n", variable_->string(), fe_->text()->string());
sout << variable_->string() << " = " << fe_->text()->string();
} else if (pval_) {
Sprintf(buf, "// %p pointer set to %s\n", pval_, fe_->text()->string());
sout << "// " << pval_ << " set to " << fe_->text()->string();
}
hoc_audit_command(buf);
auto buf = sout.str();
hoc_audit_command(buf.c_str());
}

void HocValEditor::updateField() {
Expand Down Expand Up @@ -2706,13 +2707,16 @@ void OcSlider::update(Observable*) {
}

void OcSlider::audit() {
auto sout = std::stringstream{};
char buf[200];
Sprintf(buf, "%g", *pval_);
if (variable_) {
Sprintf(buf, "%s = %g\n", variable_->string(), *pval_);
sout << variable_->string() << " = " << buf << "\n";
} else if (pval_) {
Sprintf(buf, "// %p pointer set to %g\n", pval_, *pval_);
sout << "// " << pval_ << " set to " << buf << "\n";
}
hoc_audit_command(buf);
auto str = sout.str();
hoc_audit_command(str.c_str());
if (send_) {
send_->audit();
}
Expand Down

0 comments on commit 36f59bc

Please sign in to comment.