Skip to content

Commit e219801

Browse files
authored
Fixes in docs and HDF5 support (#497)
* Fixes in docs and HDF5 support - Fixed issue #495 - Enabled HDF5 supported build and fixed HDF5 linking issue - Updated installation instructions, README. - Updated packaging to upload wheels only on master branch * Fix for mesonbuild/meson#13985 Fixes build issue on Ubuntu * Raise exception in `connect` and `element` when failed - The shell only generates an error message when an attempt to connect two objects via message fails. This caused hard to debug errors. Now the wrapper function raises RuntimeError in such case. - `element(path)` returned the roor element when `path` does not exist, again causing hard to find bugs. This now raises RuntimeError. * Minor fix in installation instructions * Updated moose.element() to raise error for nonexistent path * Implemented HHChannelF and HHGateF for formula based evaluation - Refactored HHChannelBase and created a class hierarchy for HHGate - Added test scripts for HHChannelF (`test_hhchannelf.py`) and updated test for HHChannel (`test_hhchannel.py`) - Moved voltage clamp code for test fixture into `tests/core/ephys.py` - Removed old `Func` class from default scheduling
1 parent 0326688 commit e219801

35 files changed

+2782
-1473
lines changed

.github/workflows/package.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [ubuntu-latest, macos-14, windows-latest]
11+
os: [ubuntu-latest, macos-14, macos-15, windows-latest]
1212
build_type: [Release]
1313
c_compiler: [clang]
1414
python-version: ['3.11']
@@ -105,6 +105,7 @@ jobs:
105105
python -m cibuildwheel --output-dir wheelhouse
106106
dir wheelhouse
107107
- name: Upload packages
108+
if: github.ref == 'refs/heads/main'
108109
uses: xresloader/upload-to-github-release@v1
109110
env:
110111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

INSTALL.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ To build `MOOSE` from source, you need `meson`, `ninja`, `pkg-config`, and `pyth
4343
recommend to use Python 3.9 or higher. To build and install with `pip`, you also need `meson-python`.
4444

4545
For platform specific instructions, see:
46-
- Linux: UbuntuBuild.md
47-
- MacOSX: AppleM1Build.md
48-
- Windows: WindowsBuild.md
46+
- Linux: [UbuntuBuild.md](UbuntuBuild.md)
47+
- MacOSX: [AppleM1Build.md](AppleM1Build.md)
48+
- Windows: [WindowsBuild.md](WindowsBuild.md)
4949

5050
Briefly,
5151
1. Build environment: make sure that the following packages are installed on your system.
@@ -68,6 +68,14 @@ Briefly,
6868
$ pip install git+https://github.com/BhallaLab/moose-core --user
6969
```
7070

71+
This will install the `master` branch of MOOSE. If you want a specific fork/branch, modify the address:
72+
73+
```
74+
$ pip install git+https://github.com/subhacom/moose-core@fix495merge --user
75+
```
76+
77+
will install the fix495merge branch from `subhacom`'s fork of `moose-core`.
78+
7179
## Post installation
7280

7381
You can check that moose is installed and initializes correctly by running:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ https://github.com/BhallaLab/moose-examples.
4141
# Build
4242

4343
To build `pymoose`, follow instructions given in
44-
[INSTALLATION.md](INSTALLATION.md) and for platform specific
44+
[INSTALL.md](INSTALL.md) and for platform specific
4545
information see:
4646
- Linux: [UbuntuBuild.md](UbuntuBuild.md)
4747
- MacOSX: [AppleM1Build.md](AppleM1Build.md)

UbuntuBuild.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ conda activate moose
4747
cd moose-core
4848
4949
meson setup --wipe _build --prefix=`pwd`/_build_install -Duse_mpi=false -Dbuildtype=release
50-
ninja -v -C _build
50+
meson compile -v -C _build
5151
meson install -C _build
5252
```
5353

WindowsBuild.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ $env:PATH="$env:PATH;C:\Program Files\LLVM\bin"
5353

5454
```
5555
cd moose-core
56-
meson setup --wipe _build -Duse_mpi=false --buildtype=release
57-
ninja -v -C _build
56+
meson setup --wipe _build -Duse_mpi=false --buildtype=release --vsenv
57+
meson compile -vC _build
5858
meson install -C _build
5959
```
6060
*Note: If you want to keep the installation in local folder replace the third command with: `meson setup --wipe _build --prefix={absolute-path} -Duse_mpi=false --buildtype=release` where `absolute-path` is the full path of the folder you want to install it in. You will have to add the `Lib\site-packages` directory within this to your PATH environment variable to make `moose` module visible to Python.*
@@ -68,7 +68,7 @@ Meson provides many builtin options: https://mesonbuild.com/Builtin-options.html
6868

6969

7070
```
71-
meson setup --wipe _build --prefix=%CD%\\_build_install -Duse_mpi=false -Dbuildtype=debug
71+
meson setup --wipe _build --prefix=%CD%\\_build_install -Duse_mpi=false -Dbuildtype=debug --vsenv
7272
```
7373

7474
You can either use `buildtype` option alone or use the two options `debug` and `optimization` for finer grained control over the build. According to `meson` documentation `-Dbuildtype=debug` will create a debug build with optimization level 0 (i.e., no optimization, passing `-O0 -g` to GCC), `-Dbuildtype=debugoptimized` will create a debug build with optimization level 2 (equivalent to `-Ddebug=true -Doptimization=2`), `-Dbuildtype=release` will create a release build with optimization level 3 (equivalent to `-Ddebug=false -Doptimization=3`), and `-Dbuildtype=minsize` will create a release build with space optimization (passing `-Os` to GCC).
@@ -91,7 +91,7 @@ is to make a copy of `python3x.lib` named `python3x_d.lib` in the same
9191
directory (`libs`). After that, you can run meson setup as follows:
9292

9393
```
94-
meson setup --wipe _build --prefix=%CD%\\_build_install -Duse_mpi=false --buildtype=debug
94+
meson setup --wipe _build --prefix=%CD%\\_build_install -Duse_mpi=false --buildtype=debug --vsenv
9595
```
9696

9797
and then go through the rest of the steps.

0 commit comments

Comments
 (0)