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

Improved Neuron testing... #50

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 11 additions & 4 deletions .github/workflows/non-omv-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,27 @@ on:
jobs:
build:

runs-on: ubuntu-latest
name: Build for Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.9 ]
python-version: [ "3.9", "3.10" ]
runs-on: [ubuntu-latest, macos-latest]

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

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

- name: Install HDF5 for pytables on macos-latest
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5

- name: Run scripts
run: |
pip install pyneuroml
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/omv-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,37 @@ on:

jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
python-version: [ 3.8, 3.9 ]
python-version: [ 3.9, "3.10" ]
engine:
- jNeuroML_validate
# - "NEURON:7.8.2" # slightly different spike times...
- "NEURON:8.0.0"
- "NEURON:8.0.2"
- "NEURON:8.1"
- "NEURON:8.2.0"
- jNeuroML
- jNeuroML_NEURON
- jNeuroML_NetPyNE
runs-on: [ubuntu-latest, macos-latest]

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

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

- name: Install HDF5 for pytables on macos-latest
if: ${{ matrix.runs-on == 'macos-latest' }}
run: |
brew install hdf5

- name: Install OMV
run: |
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
Expand All @@ -42,9 +49,14 @@ jobs:
- name: Compile some mod files
if: ${{ contains( matrix.engine, 'NEURON' ) }}
run: |
omv install NEURON
omv install ${{ matrix.engine }}
cd NEURON/test
nrnivmodl ../channels
ls -alt

- name: Pip version info
run: |
pip list

- name: Run OMV tests on engine ${{ matrix.engine }}
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ x86_64
NET_*.net.nml
*.channel.nml
arm64
/NeuroML2/.ipynb_checkpoints
/NeuroML2/__pycache__
4 changes: 3 additions & 1 deletion NeuroML2/CellBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

from typing import List
from neuroml import (Cell, Morphology, MembraneProperties, IntracellularProperties, BiophysicalProperties, Segment, SegmentGroup, Point3DWithDiam, SegmentParent, Member, InitMembPotential, Resistivity, SpecificCapacitance, NeuroMLDocument, IncludeType, ChannelDensity) # type: ignore # noqa
from pyneuroml.pynml import print_function # type: ignore

def print_function(string):
print('CellBuilder: %s'%string)


neuro_lex_ids = {
Expand Down
43 changes: 21 additions & 22 deletions NeuroML2/LEMS_pyr_single_comp.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Lems>

<!--

This LEMS file has been automatically generated using PyNeuroML v0.7.2 (libNeuroML v0.4.1)
This LEMS file has been automatically generated using PyNeuroML v1.1.13 (libNeuroML v0.5.8)

-->

<!-- Specify which component to run -->
<Target component="pyr_single_comp"/>

<!-- Include core NeuroML2 ComponentType definitions -->
<Include file="Cells.xml"/>
<Include file="Networks.xml"/>
<Include file="Simulation.xml"/>

<Include file="pyr_soma.net.nml"/>
<Include file="pyr_soma_cell.nml"/>
<Include file="kfast.channel.nml"/>
Expand All @@ -22,41 +22,40 @@
<Include file="nat.channel.nml"/>
<Include file="nap.channel.nml"/>
<Include file="IKM.channel.nml"/>

<Simulation id="pyr_single_comp" length="700ms" step="0.005ms" target="single_pyr_cell_network" seed="123"> <!-- Note seed: ensures same random numbers used every run -->

<OutputFile id="output0" fileName="pyr_single_comp.dat">
<OutputColumn id="pop0_0_v" quantity="pop0[0]/v"/>
<OutputColumn id="pop0_0_v" quantity="pop0[0]/v"/>
</OutputFile>

<OutputFile id="na_m" fileName="pyr_single_comp.na_m.dat">
<OutputColumn id="pop0_0_na_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/nat_channels/nat/m/q"/>
<OutputColumn id="pop0_0_na_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/nat_channels/nat/m/q"/>
</OutputFile>

<OutputFile id="na_h" fileName="pyr_single_comp.na_h.dat">
<OutputColumn id="pop0_0_na_h" quantity="pop0[0]/pyr_b_prop/membraneProperties/nat_channels/nat/h/q"/>
<OutputColumn id="pop0_0_na_h" quantity="pop0[0]/pyr_b_prop/membraneProperties/nat_channels/nat/h/q"/>
</OutputFile>

<OutputFile id="kfast_n" fileName="pyr_single_comp.kfast_n.dat">
<OutputColumn id="pop0_0_kfast_n" quantity="pop0[0]/pyr_b_prop/membraneProperties/kfast_channels/kfast/n/q"/>
<OutputColumn id="pop0_0_kfast_n" quantity="pop0[0]/pyr_b_prop/membraneProperties/kfast_channels/kfast/n/q"/>
</OutputFile>

<OutputFile id="nap_m" fileName="pyr_single_comp.nap_m.dat">
<OutputColumn id="pop0_0_nap_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/nap_channels/nap/m/q"/>
<OutputColumn id="pop0_0_nap_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/nap_channels/nap/m/q"/>
</OutputFile>

<OutputFile id="kslow_a" fileName="pyr_single_comp.kslow_a.dat">
<OutputColumn id="pop0_0_kslow_a" quantity="pop0[0]/pyr_b_prop/membraneProperties/kslow_channels/kslow/a/q"/>
<OutputColumn id="pop0_0_kslow_a" quantity="pop0[0]/pyr_b_prop/membraneProperties/kslow_channels/kslow/a/q"/>
</OutputFile>

<OutputFile id="kslow_b" fileName="pyr_single_comp.kslow_b.dat">
<OutputColumn id="pop0_0_kslow_b" quantity="pop0[0]/pyr_b_prop/membraneProperties/kslow_channels/kslow/b/q"/>
<OutputColumn id="pop0_0_kslow_b" quantity="pop0[0]/pyr_b_prop/membraneProperties/kslow_channels/kslow/b/q"/>
</OutputFile>

<OutputFile id="ikm_m" fileName="pyr_single_comp.ikm_m.dat">
<OutputColumn id="pop0_0_ikm_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/km_channels/km/m/q"/>
<OutputColumn id="pop0_0_ikm_m" quantity="pop0[0]/pyr_b_prop/membraneProperties/km_channels/km/m/q"/>
</OutputFile>

</Simulation>

</Lems>
Loading