-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from OpenSourceBrain/test_arbor_eden
Improved EDEN support
- Loading branch information
Showing
11 changed files
with
102 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,3 +119,5 @@ report*.txt | |
/getmoose | ||
/envpy* | ||
*_moose.py | ||
/utilities/tests/*.gen.c | ||
/utilities/tests/*_eden.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import subprocess as sp | ||
|
||
from omv.engines.jneuroml import JNeuroMLEngine | ||
from omv.engines.eden_ import EdenEngine | ||
from omv.common.inout import inform, trim_path, check_output, is_verbose | ||
from omv.engines.engine import EngineExecutionError | ||
|
||
|
||
class JNeuroMLEdenEngine(JNeuroMLEngine): | ||
|
||
name = "jNeuroML_EDEN" | ||
|
||
@staticmethod | ||
def is_installed(version): | ||
if is_verbose(): | ||
inform("Checking whether %s is installed..." % | ||
JNeuroMLEdenEngine.name, indent=1) | ||
return JNeuroMLEngine.is_installed(None) and EdenEngine.is_installed(None) | ||
|
||
@staticmethod | ||
def install(version): | ||
|
||
if not JNeuroMLEngine.is_installed(None): | ||
JNeuroMLEngine.install(None) | ||
if not EdenEngine.is_installed(None): | ||
EdenEngine.install(None) | ||
|
||
JNeuroMLEdenEngine.path = JNeuroMLEngine.path + \ | ||
":" + EdenEngine.path | ||
JNeuroMLEdenEngine.environment_vars = {} | ||
JNeuroMLEdenEngine.environment_vars.update( | ||
JNeuroMLEngine.environment_vars) | ||
JNeuroMLEdenEngine.environment_vars.update( | ||
EdenEngine.environment_vars) | ||
inform("PATH: " + JNeuroMLEdenEngine.path) | ||
inform("Env vars: %s" % JNeuroMLEdenEngine.environment_vars) | ||
|
||
def run(self): | ||
try: | ||
inform("Running file %s with %s" % (trim_path(self.modelpath), JNeuroMLEdenEngine.name), indent=1) | ||
from omv.engines.jneuroml import JNeuroMLEngine | ||
jnml = JNeuroMLEngine.get_executable() | ||
self.stdout = check_output([jnml, self.modelpath, '-eden'], cwd=os.path.dirname(self.modelpath),env=JNeuroMLEngine.get_environment()) | ||
self.stdout += check_output(['python', self.modelpath.replace('.xml', '_eden.py')], cwd=os.path.dirname(self.modelpath)) | ||
inform("Success with running ", JNeuroMLEdenEngine.name, indent=1) | ||
self.returncode = 0 | ||
except sp.CalledProcessError as err: | ||
inform("Error with ", JNeuroMLEdenEngine.name, indent=1) | ||
self.returncode = err.returncode | ||
self.stdout = err.output | ||
raise EngineExecutionError |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation | ||
|
||
target: LEMS_NML2_Ex5_DetCell.xml | ||
engine: jNeuroML_EDEN | ||
mep: .test.ex5.mep | ||
experiments: | ||
v: | ||
observables: | ||
spike times: | ||
file: | ||
path: ex5_v.dat | ||
columns: [0,1] | ||
scaling: [1000, 1000] | ||
spike detection: | ||
method: threshold | ||
threshold: 0 | ||
tolerance: 0.001963746223565029 |
18 changes: 9 additions & 9 deletions
18
utilities/tests/.test.ex9.jnmlbrian.omt → utilities/tests/.test.ex9.jnmleden.omt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation | ||
target: LEMS_NML2_Ex9_FN.xml | ||
engine: jNeuroML_Brian | ||
|
||
target: LEMS_NML2_Ex9_FN.xml | ||
engine: jNeuroML_EDEN | ||
mep: .test.ex9.mep | ||
experiments: | ||
V: | ||
observables: | ||
spike times: | ||
file: | ||
file: | ||
path: ex9.dat | ||
columns: [0,1] | ||
scaling: [1000, 1000] | ||
spike detection: | ||
spike detection: | ||
method: derivative | ||
tolerance: 0.004099 | ||
tolerance: 4.098360645390339e-08 | ||
W: | ||
observables: | ||
spike times: | ||
file: | ||
file: | ||
path: ex9.dat | ||
columns: [0,2] | ||
scaling: [1000, 1] | ||
spike detection: | ||
spike detection: | ||
method: derivative | ||
tolerance: 0.000616 | ||
tolerance: 5.0276520911579816e-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Script for running automated tests on OSB using Travis-CI, see https://github.com/OpenSourceBrain/osb-model-validation | ||
|
||
target: LEMS_2007One.xml | ||
engine: jNeuroML_EDEN | ||
mep: .test.exIzh.mep | ||
experiments: | ||
v: | ||
observables: | ||
spike times: | ||
file: | ||
path: exIzh.dat | ||
columns: [0,1] | ||
scaling: [1000, 1000] | ||
spike detection: | ||
method: threshold | ||
tolerance: 0.00014888369126089628 |
This file was deleted.
Oops, something went wrong.