diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c9e3ed..3e6e763 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - PyLEMS - PyLEMS_NeuroML2 - jLEMS - - jNeuroML + - "jNeuroML:v0.12.2" - jNeuroML_Brian2 - jNeuroML_EDEN - "jNeuroML_NEURON:8.2.1" diff --git a/omv/engines/getjnml.py b/omv/engines/getjnml.py index 1d473c0..0a451e6 100644 --- a/omv/engines/getjnml.py +++ b/omv/engines/getjnml.py @@ -4,10 +4,13 @@ from pathlib import Path from omv.engines.utils.wdir import working_dir +from omv.common.inout import inform -def install_jnml(): - version = "v0.12.2" +def install_jnml(version): + + if not version: + version = "v0.12.2" try: jnmlhome = os.environ["JNML_HOME"] @@ -41,3 +44,5 @@ def install_jnml(): ] ) check_output(["unzip", "jNeuroML.zip"]) + + inform("Successfully installed jNeuroML "+version, indent=1) diff --git a/omv/engines/getnetpyne.py b/omv/engines/getnetpyne.py index afcfb3a..1146bc1 100644 --- a/omv/engines/getnetpyne.py +++ b/omv/engines/getnetpyne.py @@ -47,6 +47,6 @@ def install_netpyne(version=None): "python-dateutil==2.8.0", ] ) - print(check_output([sys.executable, "setup.py", "install"])) + pip_install(".") m = "Successfully installed NetPyNE..." diff --git a/omv/engines/jneuroml.py b/omv/engines/jneuroml.py index d43c888..61ad3b3 100644 --- a/omv/engines/jneuroml.py +++ b/omv/engines/jneuroml.py @@ -78,8 +78,8 @@ def is_installed(): def install(version): from omv.engines.getjnml import install_jnml - inform("Will fetch and install the latest jNeuroML jar", indent=2) - install_jnml() + inform("Will fetch and install jNeuroML jar", indent=2) + install_jnml(version) def run(self): try: diff --git a/omv/omv_util.py b/omv/omv_util.py index 81b4ce4..a9dc0d0 100644 --- a/omv/omv_util.py +++ b/omv/omv_util.py @@ -226,14 +226,9 @@ def _install_engine(eng): if ee.is_installed(): already_installed = True else: - if engine_version is not None: - raise Exception( - "Currently, cannot install a specific version of engine %s" - % eng - ) from omv.engines.getjnml import install_jnml - install_jnml() + install_jnml(engine_version) elif eng.lower() == "neuroConstruct" or eng == "Py_neuroConstruct".lower(): from omv.engines.pyneuroconstruct import PyneuroConstructEngine as ee