Skip to content

Commit 0326688

Browse files
authored
Modifications for automatic packaging on github (#494)
* Modifications for automatic packaging on github * Added changelog * Fixes for NeuroML2 reader - Exponential operator '^' in neurml2 expressions replaced by '**' - Corrected voltage and ca dependency checks - Added scalar check for result of expression evaluation - in some cases it can be actually a constant expression evaluating to a scalar * Fixed an error with SBML reading. * github hosted runner for MacOS - fix for pkgconfig Looks like github fixed the issue with pkg-config, so earlier workaround now causing error * Updated AUTHORS
1 parent 3c89fd1 commit 0326688

File tree

18 files changed

+525
-311
lines changed

18 files changed

+525
-311
lines changed

.github/workflows/package.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Python package
2+
3+
on: [push]
4+
5+
jobs:
6+
build_wheel:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-latest, macos-14, windows-latest]
12+
build_type: [Release]
13+
c_compiler: [clang]
14+
python-version: ['3.11']
15+
# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: actions/setup-python@v5
20+
21+
- name: Install cibuildwheel
22+
run: python -m pip install cibuildwheel==2.21.3
23+
24+
- name: MacOS dpendencies
25+
if: ${{ runner.os == 'macOS' }}
26+
run: |
27+
brew install gsl
28+
brew install hdf5
29+
- name: Windows dependencies
30+
if: ${{ runner.os == 'Windows' }}
31+
uses: mamba-org/setup-micromamba@v1
32+
with:
33+
environment-name: moose
34+
cache-environment: true
35+
cache-downloads: true
36+
create-args: >-
37+
python=${{ matrix.python-version }}
38+
pkg-config
39+
clang
40+
hdf5
41+
pybind11[global]
42+
graphviz
43+
pytables
44+
numpy
45+
matplotlib
46+
vpython
47+
lxml
48+
doxygen
49+
setuptools
50+
wheel
51+
meson
52+
ninja
53+
meson-python
54+
gsl
55+
cibuildwheel
56+
post-cleanup: all
57+
generate-run-shell: false
58+
59+
- name: Linux package
60+
if: runner.os == 'Linux'
61+
env:
62+
CIBW_BUILD_VERBOSITY: 1
63+
CIBW_BEFORE_ALL: 'uname -a'
64+
CIBW_BEFORE_ALL_LINUX: >
65+
yum install -y epel-release &&
66+
yum install -y pkgconfig &&
67+
yum install -y gsl-devel &&
68+
yum install -y hdf5-devel
69+
CIBW_BUILD: '*-manylinux_x86_64'
70+
CIBW_SKIP: 'pp*'
71+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
72+
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28
73+
run: |
74+
python -m cibuildwheel --output-dir wheelhouse
75+
ls wheelhouse
76+
- name: MacOS package
77+
if: runner.os == 'macOS'
78+
env:
79+
CIBW_BUILD_VERBOSITY: 1
80+
CIBW_BEFORE_ALL: 'uname -a'
81+
CIBW_BEFORE_ALL_MACOS: >
82+
brew uninstall pkg-config || :
83+
brew uninstall pkg-config@0.29.2 || :
84+
brew install gsl hdf5 meson ninja cmake &&
85+
export PKG_CONFIG=`which pkg-config` &&
86+
echo "<<<<<<<<<#########################################>>>>>>>>>>" &&
87+
echo "$$$$$ `pkg-config --libs gsl`" &&
88+
echo "@@@@@ `pkg-config --cflags gsl`"
89+
CIBW_ARCHS: 'arm64'
90+
CIBW_BUILD: '*-macosx_arm64'
91+
CIBW_SKIP: 'pp* cp38*'
92+
run: |
93+
export "MACOSX_DEPLOYMENT_TARGET=$(echo ${{ matrix.os }} | cut -c 7-8).0" # required because gsl2.8 has minimum target of 14.0
94+
python -m cibuildwheel --output-dir wheelhouse
95+
ls wheelhouse
96+
- name: Windows package
97+
if: runner.os == 'Windows'
98+
env:
99+
CIBW_BEFORE_ALL: 'uname -a'
100+
CIBW_BUILD: '*-win_*'
101+
CIBW_SKIP: '*-win32 pp*'
102+
run: |
103+
micromamba shell hook -s powershell | Out-String | Invoke-Expression
104+
micromamba activate moose
105+
python -m cibuildwheel --output-dir wheelhouse
106+
dir wheelhouse
107+
- name: Upload packages
108+
uses: xresloader/upload-to-github-release@v1
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
with:
112+
file: "wheelhouse/pymoose*.whl"

.github/workflows/pymoose.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: Python package
1+
name: Build install test
22

33
on: [push]
44

55
jobs:
66
build:
77
runs-on: ${{ matrix.os }}
8-
strategy:
8+
strategy:
9+
fail-fast: false
910
matrix:
10-
os: [ubuntu-latest, macos-14, windows-latest]
11+
os: [ubuntu-22.04, macos-14, windows-latest]
1112
build_type: [Release]
1213
c_compiler: [clang]
1314
python-version: ["3.12"]
1415
include:
15-
- os: ubuntu-latest
16+
- os: ubuntu-22.04
1617
apt: 10
1718
- os: macos-14
1819
brew: 20
@@ -51,16 +52,15 @@ jobs:
5152
python -c "import sys; print(sys.version)"
5253
- if: ${{ matrix.apt }}
5354
run: |
54-
sudo apt-get -y install libhdf5-dev libgsl0-dev graphviz-dev python3-lxml doxygen libgsl-dev
55+
sudo apt-get update
56+
sudo apt-get -y install libgsl0-dev libgsl-dev libhdf5-dev
5557
- if: ${{ matrix.brew }}
5658
run: |
5759
brew install gsl
5860
brew install hdf5
59-
brew install graphviz
60-
brew install doxygen
6161
- name: checkout
6262
uses: actions/checkout@v4
63-
- name: build and install (non-windows)
63+
- name: Build and install (non-windows)
6464
if: runner.os != 'Windows'
6565
run: |
6666
eval "$(micromamba shell hook --shell bash)"
@@ -69,7 +69,7 @@ jobs:
6969
pip install python-libsbml
7070
pip install .
7171
python -c "import moose; moose.le()"
72-
- name: build and install (windows)
72+
- name: Build and install (windows)
7373
if: runner.os == 'Windows'
7474
run: |
7575
micromamba shell hook -s powershell | Out-String | Invoke-Expression

AUTHORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Upinder S. Bhalla Primary Architect, rdesigneur
44
HarshaRani. G.V MOOSE Website, SBML support, GUI
5-
Dilawar Singh Multithreading, GSoC, Packaging, Maintenance, BOOST solvers
5+
Subhasis Ray Lead Developer, Python interface, Packaging, Maintenance
66

77
# Past developers
88

9-
Subhasis Ray Python interface, GUI
9+
Dilawar Singh Multithreading, GSoC, Packaging, Maintenance, BOOST solvers
1010
Niraj Dudani Neuronal solver
1111
Aditya Gilra NeuroML support
1212
Aviral Goel Moogli
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
# Building MOOSE on MacOS with Apple M1 CPU
12
- Install homebrew: https://brew.sh/
23
- Set up required development environment
34
- Install command line tools for XCode
45
- Install build dependencies by running these commands in a terminal
56
```
67
brew install gsl
7-
brew install hdf5
8-
brew install graphviz
9-
brew install cmake
10-
brew install doxygen
118
```
129

1310
- Install anaconda/miniconda/micromamba/miniforge. For example, for micromamba, run
@@ -20,8 +17,7 @@
2017
- Restart terminal and create an environment with necessary packages:
2118

2219
```
23-
micromamba create -n moose hdf5 graphviz pytables numpy matplotlib vpython lxml doxygen setuptools wheel pybind11[global]
20+
micromamba create -n moose numpy matplotlib vpython lxml meson ninja meson-python gsl setuptools pybind11[global] pkg-config -c conda-forge
2421
```
2522
- Activate the moose environment: `micromamba activate moose`
26-
- Install libsbml: `pip install python-libsbml`
2723
- Install moose from github: `pip install git+https://github.com/BhallaLab/moose-core.git`

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Changelog
2+
*See https://keepachangelog.com/en/1.0.0/ for how to maintain changelog*
3+
4+
## Unreleased
5+
*Unreleased changes go here*
6+
7+
## [4.1.0] - 2024-11-28
8+
Jhangri
9+
### Added
10+
- Support for 2D HHGate/HHChannel in NeuroML reader
11+
- Native binaries for Windows
12+
13+
### Fixed
14+
- Updated to conform to c/c++-17 standard
15+
16+
### Changed
17+
- `HHGate2D`: separate `xminA`, `xminB`, etc. for `A` and `B` tables
18+
replaced by single `xmin`, `xmax`, `xdivs`, `ymin`, `ymax`, and
19+
`ydivs` fields for both tables.
20+
- Build system switched from `cmake` to `meson`
21+
22+
### Removed
23+
- Temporarily removed NSDF support due to issues with finding HDF5 in
24+
a platform independent manner.
25+
26+
## [4.0.0] - 2022-04-15
27+
Jalebi
28+
### Added
29+
- Addition of a thread-safe and faster parser based on ExprTK
30+
31+
### Changed
32+
- A major under-the-hood change to numerics for chemical calculations,
33+
eliminating the use of 'zombie' objects for the solvers. This
34+
simplifies and cleans up the code and object access, but doesn't
35+
alter runtimes.
36+
37+
- Another major under-the-hood change to use pybind11 as a much
38+
cleaner way to interface the parser with the C++ numerical code.
39+
40+
- Resurrected objects for handling simulation output saving using HDF5
41+
format. There is an HDFWriter class, an NSDFWriter, and a new
42+
NSDFWriter2. The latter two implement storage in NSDF, Neuronal
43+
Simulation Data Format, Ray et al Neuroinformatics 2016. NSDF is
44+
built on HDF5 and builds up a specification designed to ensure ready
45+
replicability as well as self- description of model output.
46+
47+
- Multiple enhancements to rdesigneur, including vastly improved 3-D
48+
graphics output using VPython.
49+
50+
### Fixed
51+
- Various bugfixes
52+

0 commit comments

Comments
 (0)