Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For NML2.3 release #68

Merged
merged 38 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9192948
feat!: drop py2 support
sanjayankur31 Jan 4, 2022
4ac4dff
ci: generate coverage metrics from pytest
sanjayankur31 Jan 4, 2022
df0c467
chore: format with black
sanjayankur31 Jan 4, 2022
89ea83e
feat: enable py310 support (and enable CI)
sanjayankur31 Jan 4, 2022
ea5650e
fix: quote python version in CI
sanjayankur31 Jan 4, 2022
6c8115d
Increment version to 0.6.0
pgleeson Feb 21, 2022
6a66d9c
Merge pull request #66 from LEMS/feat/drop-py2-support
pgleeson Feb 21, 2022
7c97c3c
Ignoring files
pgleeson Apr 25, 2022
d758c48
Test on windows
pgleeson Sep 5, 2022
7296f6a
Restructure matrix
pgleeson Sep 5, 2022
62fe60b
Remove line about requirements.txt
pgleeson Sep 5, 2022
1933223
Merge pull request #67 from LEMS/experimental
pgleeson Oct 13, 2022
2af44e0
Add badge
pgleeson Jan 11, 2023
df7792a
Merge pull request #70 from LEMS/experimental
pgleeson Jan 11, 2023
0dbcc91
Merge branch 'master' into development
pgleeson Jan 16, 2023
d349743
Tweaks
pgleeson Jan 19, 2023
2f5903f
Update actions versions
pgleeson Jan 19, 2023
d678696
Update actions versions
pgleeson Jan 19, 2023
39b50d4
chore: update copyright year
sanjayankur31 Jan 25, 2023
5b2ee95
ci(py311): add py311 to matrix and setup.py
sanjayankur31 Jan 31, 2023
6cf7633
Merge pull request #72 from LEMS/feat/py311
sanjayankur31 Jan 31, 2023
5ea5eeb
Remove old travis ci file
pgleeson Feb 3, 2023
6e713df
Apply black formatting
Mar 21, 2023
cb81080
To v0.6.1
Mar 21, 2023
0238efd
Remove travis info from readme
pgleeson May 2, 2023
b5f083a
Merge branch 'master' into development
pgleeson May 10, 2023
f97b290
To v0.6.2
pgleeson May 10, 2023
3345bab
fix(rtd): add conf file
sanjayankur31 May 10, 2023
428cd28
feat: migrate away from deprecated setup.py
sanjayankur31 Jun 14, 2023
24104c6
chore: use installed pylems script
sanjayankur31 Jun 14, 2023
c9a3e97
chore: remove duplicate flake config, remove setup.py from docs
sanjayankur31 Jun 14, 2023
5e16adc
To 0.6.3 and test on macos
pgleeson Jun 16, 2023
80c45c4
Merge pull request #73 from LEMS/chore/remove-setup.py
pgleeson Jun 16, 2023
16e725c
Fix formatting for README.md and bump to v0.6.4 fornew release
pgleeson Jun 22, 2023
67d4d3c
Add long_description_content_type
pgleeson Jun 22, 2023
03027df
chore(ci): bump GH actions
sanjayankur31 Jul 26, 2023
b8052aa
Tweak to formatting
pgleeson Jul 26, 2023
5ddd926
Merge branch 'master' into development
pgleeson Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@ name: Build

on:
push:
branches: [ master, development, test* ]
branches: [ master, development, experimental, test* ]
pull_request:
branches: [ master, development, test* ]
branches: [ master, development, experimental, test* ]

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.7", "3.9", "3.10", "3.11"]
runs-on: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install pytest pytest-cov
- name: Checkout NeuroML2
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: NeuroML/NeuroML2
ref: development
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Test with pytest
run: |
pytest
pytest --cov=lems
- name: Test examples
run: |
Expand All @@ -52,6 +52,10 @@ jobs:
run: |
./ci/run-apitest.sh
- name: Final version info
run: |
pip list
- name: Lint with flake8
run: |
# Install flake
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: nelonoel/branch-name@v1.0.1

# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
Expand All @@ -21,7 +21,7 @@ jobs:
id: extract_branch

- name: Checkout jlems
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: LEMS/jLEMS
ref: ${{ steps.extract_branch.outputs.branch }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ doc/_build
comp_*
/lems/test/hhcell_resaved3.xml
/lems/__init__$py.class
/PyLEMS.egg-info
*PyLEMS.egg-info
/dist
*ken.sh
*.whl
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ include README.md
include examples/*.xml
include examples/*.py
include LICENSE.lesser
recursive-include man *.1
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,46 @@ clean:
rm -rf doc/epydoc/*

example1:
./pylems examples/example1.xml
pylems examples/example1.xml

example2:
./pylems examples/example2.xml
pylems examples/example2.xml

example3:
./pylems examples/example3.xml
pylems examples/example3.xml

example4:
./pylems examples/example4.xml
pylems examples/example4.xml

example5:
./pylems examples/example5.xml
pylems examples/example5.xml

example6:
./pylems examples/example6.xml
pylems examples/example6.xml

example7:
./pylems examples/example7.xml
pylems examples/example7.xml

example8:
./pylems examples/example8.xml
pylems examples/example8.xml

example9:
./pylems examples/example9.xml
pylems examples/example9.xml

ex0:
./pylems examples/LEMS_NML2_Ex0.xml
pylems examples/LEMS_NML2_Ex0.xml

nmlex0:
./pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex0_IaF.xml
pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex0_IaF.xml

nmlex1:
./pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex1_HH.xml
pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex1_HH.xml

nmlex2:
./pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex2_Izh.xml
pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex2_Izh.xml

nmlex3:
./pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex3_Net.xml
pylems ../NeuroML2/NeuroML2CoreTypes/LEMS_NML2_Ex3_Net.xml

run: example1

Expand Down
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
[![Documentation Status](https://readthedocs.org/projects/pylems/badge/?version=latest)](https://pylems.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/pylems)](https://pypi.org/project/pylems/)


A LEMS (http://lems.github.io/LEMS) simulator written in Python which can be used to run NeuroML2 (http://neuroml.org/neuroml2.php) models.
A LEMS (http://lems.github.io/LEMS) simulator written in Python which can be used to run NeuroML2 models (see [here](https://docs.neuroml.org/Userdocs/Software/pyLEMS.html)).

For more about PyLEMS see:

Expand All @@ -22,36 +21,35 @@ Robert C. Cannon, Padraig Gleeson, Sharon Crook, Gautham Ganapathy, Boris Marin,
**LEMS: A language for expressing complex biological models in concise and hierarchical form and its use in underpinning NeuroML 2**,
[Frontiers in Neuroinformatics 2014](http://journal.frontiersin.org/Journal/10.3389/fninf.2014.00079/abstract), doi: 10.3389/fninf.2014.00079


### Installation

A stable version of PyLEMS is [available on PyPI](https://pypi.python.org/pypi/PyLEMS) using [pip](https://pip.pypa.io/en/latest/installing.html):

pip install pylems

To install as root:

sudo pip install pylems
```
pip install pylems
```

Alternatively, you can obtain the latest version with

git clone https://github.com/LEMS/pylems.git
cd pylems
git checkout development # optional
sudo python setup.py install
```
git clone https://github.com/LEMS/pylems.git
cd pylems
git checkout development # optional
pip install .
```

### Usage as a LEMS model simulator

pylems [options] LEMS_file
```
pylems [options] LEMS_file
```

**Options**

- -I/-include path - Adds a directory to the model file include search path


### Examples


**NeuroML examples (from https://github.com/NeuroML/NeuroML2/tree/development/NeuroML2CoreTypes)**

- Example 0 -- Working
Expand All @@ -74,7 +72,6 @@ Alternatively, you can obtain the latest version with
- Example 17 -- Working
- Example 18 -- Working


**LEMS examples (in directory examples)**

- example1.xml -- Working
Expand All @@ -83,9 +80,8 @@ Alternatively, you can obtain the latest version with
- example4.xml -- Not working (Unsupported in PyLEMS: KSChannel)
- example5.xml -- Not working (Unsupported in PyLEMS: KSChannel)
- example6.xml -- Working
-- TODO: Rest of examples require an update to the `<Simulation>` element,
i.e. use `<Simulation...>` not `<SimulationSet...>`, to work in PyLEMS

TODO: Rest of examples require an update to the `<Simulation>` element, i.e. use `<Simulation...>` not `<SimulationSet...>`, to work in PyLEMS

**LEMS elements that do not work**

Expand Down
10 changes: 7 additions & 3 deletions ci/run-apitest.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2021 LEMS contributors
# Copyright 2023 LEMS contributors
# Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
# File : run-apitest.sh
#
Expand All @@ -12,6 +12,10 @@ python examples/loadtest.py

# Update NeuroML2 path for CI
if [ "$CI" = "true" ]; then
sed -i 's|../NeuroML2|./NeuroML2|g' lems/dlems/exportdlems.py
if [ "$RUNNER_OS" = "macOS" ]; then
sed -i '' 's|../NeuroML2|./NeuroML2|g' lems/dlems/exportdlems.py;
else
sed -i 's|../NeuroML2|./NeuroML2|g' lems/dlems/exportdlems.py;
fi
fi
python lems/dlems/exportdlems.py
python lems/dlems/exportdlems.py
48 changes: 24 additions & 24 deletions ci/run-examples-ghactions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2021 LEMS contributors
# Copyright 2023 LEMS contributors
# Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
# File : run-examples-ghactions.sh
#
Expand All @@ -10,33 +10,33 @@ mkdir results

### Try running "standard" LEMS examples
echo "Running standard LEMS examples"
./pylems examples/example1.xml -nogui
./pylems examples/example2.xml -nogui
./pylems examples/example3.xml -nogui
#./pylems examples/example4.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
#./pylems examples/example5.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
./pylems examples/example6.xml -nogui
./pylems examples/bounce-conditional.xml -nogui
pylems examples/example1.xml -nogui
pylems examples/example2.xml -nogui
pylems examples/example3.xml -nogui
#pylems examples/example4.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
#pylems examples/example5.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
pylems examples/example6.xml -nogui
pylems examples/bounce-conditional.xml -nogui
# Rest of examples require an update to the <Simulation> element, i.e. use <Simulation...> not <SimulationSet...>, to work in PyLEMS

### Try running NeuroML 2 examples
echo "Running NeuroML2 examples"
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex0_IaF.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex1_HH.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex2_Izh.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex3_Net.xml -nogui
#./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex4_KS.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex5_DetCell.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex6_NMDA.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex7_STP.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex8_AdEx.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -nogui
#./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex10_Q10.xml -nogui
./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex11_STDP.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex0_IaF.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex1_HH.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex2_Izh.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex3_Net.xml -nogui
#pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex4_KS.xml -nogui # Not working (Unsupported in PyLEMS: KSChannel)
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex5_DetCell.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex6_NMDA.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex7_STP.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex8_AdEx.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex9_FN.xml -nogui
#pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex10_Q10.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex11_STDP.xml -nogui

./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex13_Instances.xml -nogui
pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex13_Instances.xml -nogui

#./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex15_CaDynamics.xml -nogui
#pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex15_CaDynamics.xml -nogui

#./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex17_Tissue.xml -nogui
#./pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex18_GHK.xml -nogui # Mismatch...
#pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex17_Tissue.xml -nogui
#pylems -I NeuroML2/NeuroML2CoreTypes/ NeuroML2/LEMSexamples/LEMS_NML2_Ex18_GHK.xml -nogui # Mismatch...
Loading