33
44from omv .common .inout import inform , trim_path , check_output
55from omv .engines .engine import EngineExecutionError
6- from omv .engines .pyneuroml_ import PyNeuroMLEngine
6+ from omv .engines .pyneuroml_ import PyNeuroMLEngine
77from omv .engines .engine import PATH_DELIMITER
88from omv .engines .utils import resolve_paths
99
10+
1011class PyNeuroMLValidateSBMLEngine (PyNeuroMLEngine ):
1112 name = "pyNeuroML_validate_sbml"
1213
1314 @staticmethod
1415 def is_installed ():
15- if not PyNeuroMLEngine .is_installed (): return False
16+ if not PyNeuroMLEngine .is_installed ():
17+ return False
1618
1719 ret = True
1820 try :
1921 inform (
20- "Checking whether %s is installed..." % PyNeuroMLValidateSBMLEngine .name ,
22+ "Checking whether %s is installed..."
23+ % PyNeuroMLValidateSBMLEngine .name ,
2124 indent = 1 ,
2225 verbosity = 2 ,
2326 )
@@ -37,7 +40,8 @@ def is_installed():
3740
3841 @staticmethod
3942 def install (version ):
40- if not PyNeuroMLEngine .is_installed (): PyNeuroMLEngine .install (None )
43+ if not PyNeuroMLEngine .is_installed ():
44+ PyNeuroMLEngine .install (None )
4145
4246 from omv .engines .getlibsbml import install_libsbml
4347
@@ -54,19 +58,20 @@ def run(self):
5458 verbosity = 1 ,
5559 )
5660
57- #pynml = PyNeuroMLEngine.get_executable() #could implement more flexible way to find the executeable
61+ # pynml = PyNeuroMLEngine.get_executable() #could implement more flexible way to find the executeable
5862 cmds = ["pynml" , "-validate-sbml" ]
5963 for p in path_s :
6064 cmds .append (p )
6165
6266 inform (
63- "Running with %s, using: %s..." % (PyNeuroMLValidateSBMLEngine .name , cmds ),
67+ "Running with %s, using: %s..."
68+ % (PyNeuroMLValidateSBMLEngine .name , cmds ),
6469 indent = 1 ,
6570 )
6671 self .stdout = check_output (
6772 cmds ,
68- cwd = os .path .dirname (self .modelpath .split (PATH_DELIMITER )[0 ])
69- #env=PyNeuroMLEngine.get_environment(),
73+ cwd = os .path .dirname (self .modelpath .split (PATH_DELIMITER )[0 ]),
74+ # env=PyNeuroMLEngine.get_environment(),
7075 )
7176 inform (
7277 "Success with running " ,
@@ -76,8 +81,9 @@ def run(self):
7681 )
7782 self .returncode = 0
7883 except sp .CalledProcessError as err :
79- inform ("Error with " , PyNeuroMLValidateSBMLEngine .name , indent = 1 , verbosity = 1 )
84+ inform (
85+ "Error with " , PyNeuroMLValidateSBMLEngine .name , indent = 1 , verbosity = 1
86+ )
8087 self .returncode = err .returncode
8188 self .stdout = err .output
8289 raise EngineExecutionError
83-
0 commit comments