@@ -36,6 +36,13 @@ def checkout(folder, default_branch, cwdp):
3636 subprocess .call (['git' , 'checkout' , default_branch ], cwd = './' )
3737 os .chdir (currentPath )
3838
39+ def clone_repo (project , repo_name , ** kwargs ):
40+ normal = "\033 [0;37;40m"
41+ stroke = "\033 [1;32;40m\n "
42+ subprocess .run (["echo" , f'{ stroke } Cloning { repo_name } from { project } { stroke } ' ])
43+ url = f'https://github.com/{ project } /{ repo_name } .git'
44+ clone (url , ** kwargs )
45+
3946def main (argv ):
4047 global branch
4148 if (len (argv ) > 0 ):
@@ -47,22 +54,54 @@ def main(argv):
4754
4855os .chdir (os .getcwd ()+ "/../" )
4956
50-
51- clone ( 'https://github.com/Neurosim-lab/netpyne.git' , 'netpyne' , 'ui' )
52- subprocess .call (['pip ' , 'install ' , '-e ' , '.' ], cwd = './netpyne/' )
57+ # Fix terminado installation error
58+ terminado_path = '/opt/conda/lib/python3.7/site-packages/'
59+ subprocess .call (['rm ' , '-rf ' , terminado_path + 'terminado ' , terminado_path + 'terminado-0.8.3.dist-info' , terminado_path + 'terminado-0.8.3-py3.7.egg-info' ] )
5360
5461
62+ clone_repo (project = 'Neurosim-lab' ,
63+ repo_name = 'netpyne' ,
64+ folder = 'netpyne' ,
65+ default_branch = 'ui'
66+ )
67+ subprocess .call (['python3' , '-m' , 'pip' , 'install' , '-e' , '.' ], cwd = './netpyne/' )
5568
5669# We can't clone org.geppetto.frontend as a regular submodule because Travis doesn't have .gitmodules in the zip
5770# subprocess.call(['git', 'submodule', 'update', '--init'], cwd='./')
58- clone ('https://github.com/openworm/org.geppetto.frontend.git' ,'geppetto' ,'v0.4.2-alpha' ,'netpyne_ui/' , False , 'geppetto' )
59- clone ('https://github.com/MetaCell/geppetto-netpyne.git' ,'geppetto-netpyne' ,'development' ,'netpyne_ui/geppetto/src/main/webapp/extensions/' )
71+ clone_repo (project = 'openworm' ,
72+ repo_name = 'org.geppetto.frontend' ,
73+ folder = 'geppetto' ,
74+ default_branch = 'v0.4.2-alpha' ,
75+ cwdp = 'netpyne_ui/' ,
76+ recursive = False ,
77+ destination_folder = 'geppetto'
78+ )
79+
80+ clone_repo (project = 'MetaCell' ,
81+ repo_name = 'geppetto-netpyne' ,
82+ folder = 'geppetto-netpyne' ,
83+ default_branch = 'development' ,
84+ cwdp = 'netpyne_ui/geppetto/src/main/webapp/extensions/'
85+ )
6086
6187branch = None
6288# Cloning Repos
63- clone ('https://github.com/openworm/pygeppetto.git' ,'pygeppetto' ,'development' )
64- subprocess .call (['pip' , 'install' , '-e' , '.' ], cwd = './pygeppetto/' )
65- clone ('https://github.com/openworm/org.geppetto.frontend.jupyter.git' ,'org.geppetto.frontend.jupyter' ,'development' )
89+
90+ clone_repo (project = 'openworm' ,
91+ repo_name = 'pygeppetto' ,
92+ folder = 'pygeppetto' ,
93+ default_branch = 'development'
94+ )
95+ subprocess .call (['python3' , '-m' , 'pip' , 'install' , '-e' , '.' ], cwd = './pygeppetto/' )
96+
97+
98+ clone_repo (project = 'openworm' ,
99+ repo_name = 'org.geppetto.frontend.jupyter' ,
100+ folder = 'org.geppetto.frontend.jupyter' ,
101+ default_branch = 'development'
102+ )
103+
104+
66105with open ('npm_frontend_jupyter_log' , 'a' ) as stdout :
67106 subprocess .call (['npm' , 'install' ], cwd = './org.geppetto.frontend.jupyter/js' , stdout = stdout )
68107subprocess .call (['npm' , 'run' , 'build-dev' ], cwd = './org.geppetto.frontend.jupyter/js' )
@@ -78,12 +117,12 @@ def main(argv):
78117subprocess .call (['npm' , 'run' , 'build-dev-noTest' ], cwd = './netpyne_ui/geppetto/src/main/webapp/' )
79118
80119print ("Installing jupyter_geppetto python package ..." )
81- subprocess .call (['pip' , 'install' , '-e' , '.' ], cwd = './org.geppetto.frontend.jupyter' )
120+ subprocess .call (['python3' , '-m' , ' pip' , 'install' , '-e' , '.' ], cwd = './org.geppetto.frontend.jupyter' )
82121print ("Installing jupyter_geppetto Jupyter Extension ..." )
83122subprocess .call (['jupyter' , 'nbextension' , 'install' , '--py' , '--symlink' , '--sys-prefix' , 'jupyter_geppetto' ], cwd = './org.geppetto.frontend.jupyter' )
84123subprocess .call (['jupyter' , 'nbextension' , 'enable' , '--py' , '--sys-prefix' , 'jupyter_geppetto' ], cwd = './org.geppetto.frontend.jupyter' )
85124subprocess .call (['jupyter' , 'nbextension' , 'enable' , '--py' , '--sys-prefix' , 'widgetsnbextension' ], cwd = './org.geppetto.frontend.jupyter' )
86125subprocess .call (['jupyter' , 'serverextension' , 'enable' , '--sys-prefix' , '--py' , 'jupyter_geppetto' ], cwd = './org.geppetto.frontend.jupyter' )
87126
88127print ("Installing NetPyNE UI python package ..." )
89- subprocess .call (['pip' , 'install' , '-e' , '.' ], cwd = '.' )
128+ subprocess .call (['python3' , '-m' , ' pip' , 'install' , '-e' , '.' ], cwd = '.' )
0 commit comments