Skip to content

Commit

Permalink
Option to install a particular version of jnml
Browse files Browse the repository at this point in the history
  • Loading branch information
pgleeson committed Sep 1, 2023
1 parent 4ff8207 commit 81a4cec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- PyLEMS
- PyLEMS_NeuroML2
- jLEMS
- jNeuroML
- "jNeuroML:v0.12.2"
- jNeuroML_Brian2
- jNeuroML_EDEN
- "jNeuroML_NEURON:8.2.1"
Expand Down
9 changes: 7 additions & 2 deletions omv/engines/getjnml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -41,3 +44,5 @@ def install_jnml():
]
)
check_output(["unzip", "jNeuroML.zip"])

inform("Successfully installed jNeuroML "+version, indent=1)
7 changes: 1 addition & 6 deletions omv/omv_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 81a4cec

Please sign in to comment.