Skip to content

Commit

Permalink
Merge pull request #111 from OpenSourceBrain/test_jnml
Browse files Browse the repository at this point in the history
Use pip install for netpyne
  • Loading branch information
pgleeson authored Sep 12, 2023
2 parents 4ff8207 + 3eac6a8 commit 8fd2324
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 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)
2 changes: 1 addition & 1 deletion omv/engines/getnetpyne.py
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
4 changes: 2 additions & 2 deletions omv/engines/jneuroml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
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 8fd2324

Please sign in to comment.