Skip to content

Commit

Permalink
Merge pull request #1 from OpenSourceBrain/development
Browse files Browse the repository at this point in the history
Tests with pynn 0.10.1
  • Loading branch information
pgleeson authored Mar 28, 2023
2 parents a62c089 + 1bbcc1d commit f4dc4e1
Show file tree
Hide file tree
Showing 15 changed files with 238 additions and 39 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/omv-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,44 @@ jobs:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.7 ]
engine: [ jNeuroML, jNeuroML_NEURON, jNeuroML_PyNN_NEURON, jNeuroML_validate, PyNN_NEURON, PyNN_Nest, PyNN_NeuroML]
python-version: [ "3.8", "3.9" ]
engine: [ jNeuroML, jNeuroML_NEURON, jNeuroML_PyNN_NEURON, jNeuroML_validate, PyNN_NEURON, PyNN_Nest, PyNN_NeuroML, PyNN_Brian2]

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@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install OMV
run: |
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
- name: Install additional packages
run: |
pip install scipy sympy matplotlib cython tables
pip install 'numpy<=1.23.0' # see https://github.com/OpenSourceBrain/osb-model-validation/issues/91
- name: Run OMV tests on engine ${{ matrix.engine }}
run: |
omv all -V --engine=${{ matrix.engine }}
- name: Regenerate
run: |
omv install PyNN # required for regeneration...
omv install pyNeuroML # required for regeneration...
omv install jNeuroML
export JNML_HOME=/home/runner/jnml/jNeuroMLJar
export PATH=$JNML_HOME:$PATH
./regenerate.sh
- name: OMV final version info
run: |
omv list -V # list installed engines
22 changes: 11 additions & 11 deletions NeuroML2/ConnectionsTest.net.nml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd" id="ConnectionsTest">
<notes>
This NeuroML 2 file has been generated from:
PyNN v0.9.6
PyNN v0.10.1
libNeuroML v0.4.2
pyNeuroML v0.7.6
</notes>
Expand All @@ -17,38 +17,38 @@
<property tag="radius" value="5"/>
<property tag="color" value="0 0.6 0"/>
<instance id="0">
<location x="40.34175597194811" y="-56.591291366920451" z="-52.704297599046448"/>
<location x="87.867091429339169" y="36.566883841576825" z="23.819394994835253"/>
</instance>
<instance id="1">
<location x="27.96964049341377" y="20.619331756707048" z="-40.861803830870279"/>
<location x="-22.414732648986103" y="-33.959789395443416" z="-90.377208907138694"/>
</instance>
<instance id="2">
<location x="-8.822322646973713" y="-79.443343688098949" z="-10.011891220669566"/>
<location x="54.996078669841175" y="63.22244265268138" z="8.332732747183268"/>
</instance>
<instance id="3">
<location x="-21.849212000552342" y="65.752552974467363" z="-27.538654076756487"/>
<location x="-73.045184370403433" y="15.931090520535406" z="-47.20047085637156"/>
</instance>
<instance id="4">
<location x="-38.26786504445414" y="76.745597854841847" z="-42.373649722922991"/>
<location x="11.886080666355546" y="-72.950647718983646" z="55.989089396806754"/>
</instance>
</population>
<population id="pop_post" component="IF_cond_alpha_pop_post" size="5" type="populationList">
<property tag="radius" value="5"/>
<property tag="color" value="0 0.2 0.6"/>
<instance id="0">
<location x="19.648700064194369" y="173.856015370791141" z="13.332375422194209"/>
<location x="32.097856025221816" y="177.715247089212056" z="-61.948698498499269"/>
</instance>
<instance id="1">
<location x="-25.653976862017934" y="186.933936247131953" z="55.394154045388987"/>
<location x="-74.115635174364087" y="241.910458891653718" z="3.906619842172132"/>
</instance>
<instance id="2">
<location x="8.878043164817528" y="218.933571545824407" z="-52.732081800665419"/>
<location x="54.387445031828904" y="192.588501616654327" z="-11.472415749409581"/>
</instance>
<instance id="3">
<location x="-21.626477676017085" y="169.336848396064056" z="23.243945074367289"/>
<location x="-14.603226514170453" y="171.734277722969381" z="-35.411273746924962"/>
</instance>
<instance id="4">
<location x="-10.321197646621894" y="230.787142220533354" z="93.051345121134659"/>
<location x="21.253482956578583" y="278.993049504672911" z="6.694332496085975"/>
</instance>
</population>
<projection id="pop_pre__TO__pop_post" presynapticPopulation="pop_pre" postsynapticPopulation="pop_post" synapse="syn__pop_pre__TO__pop_post">
Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/Inputs.net.nml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd" id="Inputs">
<notes>
This NeuroML 2 file has been generated from:
PyNN v0.9.6
PyNN v0.10.1
libNeuroML v0.4.2
pyNeuroML v0.7.6
</notes>
Expand Down
2 changes: 1 addition & 1 deletion NeuroML2/LEMS_Sim_Inputs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been generated from:
PyNN v0.9.6
PyNN v0.10.1
libNeuroML v0.4.2
pyNeuroML v0.7.6
-->
Expand Down
28 changes: 20 additions & 8 deletions NeuroML2/LEMS_Sim_PyNN_NeuroML2_Export.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
This LEMS file has been generated from:
PyNN v0.9.6
PyNN v0.10.1
libNeuroML v0.4.2
pyNeuroML v0.7.6
-->
Expand All @@ -22,38 +22,44 @@

<Display id="pop_IF_curr_alpha_v" title="pop_IF_curr_alpha v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_IF_curr_alpha v: cell 42" quantity="pop_IF_curr_alpha/0/IF_curr_alpha_pop_IF_curr_alpha/v" scale="1mV" color="#d54f33" timeScale="1ms"/>
<Line id="pop_IF_curr_alpha v: cell 43" quantity="pop_IF_curr_alpha/1/IF_curr_alpha_pop_IF_curr_alpha/v" scale="1mV" color="#0534e4" timeScale="1ms"/>
<Line id="pop_IF_curr_alpha v: cell 44" quantity="pop_IF_curr_alpha/2/IF_curr_alpha_pop_IF_curr_alpha/v" scale="1mV" color="#98e752" timeScale="1ms"/>
</Display>

<Display id="pop_IF_curr_exp_v" title="pop_IF_curr_exp v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_IF_curr_exp v: cell 43" quantity="pop_IF_curr_exp/0/IF_curr_exp_pop_IF_curr_exp/v" scale="1mV" color="#0534e4" timeScale="1ms"/>
<Line id="pop_IF_curr_exp v: cell 45" quantity="pop_IF_curr_exp/0/IF_curr_exp_pop_IF_curr_exp/v" scale="1mV" color="#bca074" timeScale="1ms"/>
</Display>

<Display id="pop_IF_cond_alpha_v" title="pop_IF_cond_alpha v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_IF_cond_alpha v: cell 44" quantity="pop_IF_cond_alpha/0/IF_cond_alpha_pop_IF_cond_alpha/v" scale="1mV" color="#98e752" timeScale="1ms"/>
<Line id="pop_IF_cond_alpha v: cell 46" quantity="pop_IF_cond_alpha/0/IF_cond_alpha_pop_IF_cond_alpha/v" scale="1mV" color="#632794" timeScale="1ms"/>
</Display>

<Display id="pop_IF_cond_exp_v" title="pop_IF_cond_exp v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_IF_cond_exp v: cell 45" quantity="pop_IF_cond_exp/0/IF_cond_exp_pop_IF_cond_exp/v" scale="1mV" color="#bca074" timeScale="1ms"/>
<Line id="pop_IF_cond_exp v: cell 48" quantity="pop_IF_cond_exp/1/IF_cond_exp_pop_IF_cond_exp/v" scale="1mV" color="#8a5d88" timeScale="1ms"/>
<Line id="pop_IF_cond_exp v: cell 49" quantity="pop_IF_cond_exp/2/IF_cond_exp_pop_IF_cond_exp/v" scale="1mV" color="#df5954" timeScale="1ms"/>
<Line id="pop_IF_cond_exp v: cell 47" quantity="pop_IF_cond_exp/0/IF_cond_exp_pop_IF_cond_exp/v" scale="1mV" color="#52c8bf" timeScale="1ms"/>
</Display>

<Display id="pop_EIF_cond_exp_isfa_ista_v" title="pop_EIF_cond_exp_isfa_ista v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_EIF_cond_exp_isfa_ista v: cell 46" quantity="pop_EIF_cond_exp_isfa_ista/0/EIF_cond_exp_isfa_ista_pop_EIF_cond_exp_isfa_ista/v" scale="1mV" color="#632794" timeScale="1ms"/>
<Line id="pop_EIF_cond_exp_isfa_ista v: cell 50" quantity="pop_EIF_cond_exp_isfa_ista/0/EIF_cond_exp_isfa_ista_pop_EIF_cond_exp_isfa_ista/v" scale="1mV" color="#bf0239" timeScale="1ms"/>
</Display>

<Display id="pop_HH_cond_exp_v" title="pop_HH_cond_exp v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_HH_cond_exp v: cell 47" quantity="pop_HH_cond_exp/0/HH_cond_exp_pop_HH_cond_exp/v" scale="1mV" color="#8a5d88" timeScale="1ms"/>
<Line id="pop_HH_cond_exp v: cell 51" quantity="pop_HH_cond_exp/0/HH_cond_exp_pop_HH_cond_exp/v" scale="1mV" color="#3f9fe8" timeScale="1ms"/>
</Display>

<Display id="pop_post1_v" title="pop_post1 v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_post1 v: cell 48" quantity="pop_post1/0/IF_cond_exp_pop_post1/v" scale="1mV" color="#df5954" timeScale="1ms"/>
<Line id="pop_post1 v: cell 52" quantity="pop_post1/0/IF_cond_exp_pop_post1/v" scale="1mV" color="#dda9d2" timeScale="1ms"/>
</Display>

<Display id="pop_post2_v" title="pop_post2 v" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-70" ymax="10">
<Line id="pop_post2 v: cell 49" quantity="pop_post2/0/IF_cond_alpha_pop_post2/v" scale="1mV" color="#52c8bf" timeScale="1ms"/>
<Line id="pop_post2 v: cell 53" quantity="pop_post2/0/IF_cond_alpha_pop_post2/v" scale="1mV" color="#85ad96" timeScale="1ms"/>
</Display>

<OutputFile id="OF_pop_IF_curr_alpha_v" fileName="pop_IF_curr_alpha_v.dat">
<OutputColumn id="pop_IF_curr_alpha_0_IF_curr_alpha_pop_IF_curr_alpha_v" quantity="pop_IF_curr_alpha/0/IF_curr_alpha_pop_IF_curr_alpha/v"/>
<OutputColumn id="pop_IF_curr_alpha_1_IF_curr_alpha_pop_IF_curr_alpha_v" quantity="pop_IF_curr_alpha/1/IF_curr_alpha_pop_IF_curr_alpha/v"/>
<OutputColumn id="pop_IF_curr_alpha_2_IF_curr_alpha_pop_IF_curr_alpha_v" quantity="pop_IF_curr_alpha/2/IF_curr_alpha_pop_IF_curr_alpha/v"/>
</OutputFile>

<OutputFile id="OF_pop_IF_curr_exp_v" fileName="pop_IF_curr_exp_v.dat">
Expand All @@ -65,6 +71,8 @@
</OutputFile>

<OutputFile id="OF_pop_IF_cond_exp_v" fileName="pop_IF_cond_exp_v.dat">
<OutputColumn id="pop_IF_cond_exp_1_IF_cond_exp_pop_IF_cond_exp_v" quantity="pop_IF_cond_exp/1/IF_cond_exp_pop_IF_cond_exp/v"/>
<OutputColumn id="pop_IF_cond_exp_2_IF_cond_exp_pop_IF_cond_exp_v" quantity="pop_IF_cond_exp/2/IF_cond_exp_pop_IF_cond_exp/v"/>
<OutputColumn id="pop_IF_cond_exp_0_IF_cond_exp_pop_IF_cond_exp_v" quantity="pop_IF_cond_exp/0/IF_cond_exp_pop_IF_cond_exp/v"/>
</OutputFile>

Expand All @@ -86,9 +94,13 @@

<EventOutputFile id="Spikes_file_pop_IF_curr_alpha" fileName="pop_IF_curr_alpha.spikes" format="TIME_ID">
<EventSelection id="0" select="pop_IF_curr_alpha/0/IF_curr_alpha_pop_IF_curr_alpha" eventPort="spike"/>
<EventSelection id="1" select="pop_IF_curr_alpha/1/IF_curr_alpha_pop_IF_curr_alpha" eventPort="spike"/>
<EventSelection id="2" select="pop_IF_curr_alpha/2/IF_curr_alpha_pop_IF_curr_alpha" eventPort="spike"/>
</EventOutputFile>

<EventOutputFile id="Spikes_file_pop_IF_cond_exp" fileName="pop_IF_cond_exp.spikes" format="TIME_ID">
<EventSelection id="1" select="pop_IF_cond_exp/1/IF_cond_exp_pop_IF_cond_exp" eventPort="spike"/>
<EventSelection id="2" select="pop_IF_cond_exp/2/IF_cond_exp_pop_IF_cond_exp" eventPort="spike"/>
<EventSelection id="0" select="pop_IF_cond_exp/0/IF_cond_exp_pop_IF_cond_exp" eventPort="spike"/>
</EventOutputFile>

Expand Down
Binary file modified NeuroML2/Positions.net.nml.h5
Binary file not shown.
18 changes: 15 additions & 3 deletions NeuroML2/PyNN_NeuroML2_Export.net.nml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2.3.xsd" id="PyNN_NeuroML2_Export">
<notes>
This NeuroML 2 file has been generated from:
PyNN v0.9.6
PyNN v0.10.1
libNeuroML v0.4.2
pyNeuroML v0.7.6
</notes>
Expand All @@ -16,10 +16,16 @@
<expCondSynapse id="syn__pop_EIF_cond_exp_isfa_ista__TO__pop_post1" tau_syn="5." e_rev="0."/>
<alphaCondSynapse id="syn__pop_EIF_cond_exp_isfa_ista__TO__pop_post2" tau_syn="5." e_rev="0."/>
<network id="PyNN_NeuroML2_Export">
<population id="pop_IF_curr_alpha" component="IF_curr_alpha_pop_IF_curr_alpha" size="1" type="populationList">
<population id="pop_IF_curr_alpha" component="IF_curr_alpha_pop_IF_curr_alpha" size="3" type="populationList">
<instance id="0">
<location x="0." y="0." z="0."/>
</instance>
<instance id="1">
<location x="1." y="0." z="0."/>
</instance>
<instance id="2">
<location x="2." y="0." z="0."/>
</instance>
</population>
<population id="pop_IF_curr_exp" component="IF_curr_exp_pop_IF_curr_exp" size="1" type="populationList">
<instance id="0">
Expand All @@ -31,10 +37,16 @@
<location x="0." y="0." z="0."/>
</instance>
</population>
<population id="pop_IF_cond_exp" component="IF_cond_exp_pop_IF_cond_exp" size="1" type="populationList">
<population id="pop_IF_cond_exp" component="IF_cond_exp_pop_IF_cond_exp" size="3" type="populationList">
<instance id="0">
<location x="0." y="0." z="0."/>
</instance>
<instance id="1">
<location x="1." y="0." z="0."/>
</instance>
<instance id="2">
<location x="2." y="0." z="0."/>
</instance>
</population>
<population id="pop_EIF_cond_exp_isfa_ista" component="EIF_cond_exp_isfa_ista_pop_EIF_cond_exp_isfa_ista" size="1" type="populationList">
<instance id="0">
Expand Down
26 changes: 26 additions & 0 deletions PyNN/.test.input.brian2.omt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

target: InputsTest.py
engine: PyNN_Brian2
mep: .test.input.mep
experiments:
v0:
observables:
spike times:
file:
path: pop_pre_v.dat
columns: [0,1]
scaling: [1000, 1000]
spike detection:
method: threshold
threshold: -50.1
tolerance: 0.00377714825306902460

spikes2:
observables:
spike times:
spiketimes file:
path: pop_pre.spikes
format: TIME_ID
ids: 2
tolerance: 0.0031104199066874054
8 changes: 8 additions & 0 deletions PyNN/.test.mep
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ experiments:
pop_post2:
expected:
spike times: [56.94, 106.92999999999999, 203.78, 312.56, 421.68]

spike_rate_IF_curr_alpha_0:
expected:
spike rate: 31.274433150899135

spike_rate_IF_curr_alpha_1:
expected:
spike rate: 31.274433150899135

59 changes: 59 additions & 0 deletions PyNN/.test.pynn9brian2.omt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation

target: NeuroMLTest_PyNN0.9.py
engine: PyNN_Brian2
mep: .test.mep
experiments:
IF_curr_alpha:
observables:
spike times:
file:
path: pop_IF_curr_alpha_0_v.dat
columns: [0,1]
scaling: [1000, 1000]
spike detection:
method: threshold
threshold: -55
tolerance: 0.00030816640986148277
EIF_cond_exp_isfa_ista:
observables:
spike times:
file:
path: pop_EIF_cond_exp_isfa_ista_0_v.dat
columns: [0,1]
scaling: [1000, 1000]
spike detection:
method: threshold
threshold: -45
tolerance: 0.0003676020095576662
pop_post2:
observables:
spike times:
file:
path: pop_post2_0_v.dat
columns: [0,1]
scaling: [1000, 1000]
spike detection:
method: threshold
threshold: -63.5
tolerance: 0.0007024938531787697

spike_rate_IF_curr_alpha_0:
observables:
spike rate:
spiketimes file:
path: pop_IF_curr_alpha.spikes
format: ID_TIME
scaling: 1
ids: 0
tolerance: 0.00015639662183320716

spike_rate_IF_curr_alpha_1:
observables:
spike rate:
spiketimes file:
path: pop_IF_curr_alpha.spikes
format: ID_TIME
scaling: 1
ids: 1
tolerance: 0.00015639662183320716
22 changes: 21 additions & 1 deletion PyNN/.test.pynn9nest.omt
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,24 @@ experiments:
spike detection:
method: threshold
threshold: -63.5
tolerance: 0.0001403
tolerance: 0.0001403

spike_rate_IF_curr_alpha_0:
observables:
spike rate:
spiketimes file:
path: pop_IF_curr_alpha.spikes
format: ID_TIME
scaling: 1
ids: 0
tolerance: 0.00

spike_rate_IF_curr_alpha_1:
observables:
spike rate:
spiketimes file:
path: pop_IF_curr_alpha.spikes
format: ID_TIME
scaling: 1
ids: 1
tolerance: 0.00
Loading

0 comments on commit f4dc4e1

Please sign in to comment.