|
9 | 9 |
|
10 | 10 | #by default clones branch (which can be passed as a parameter python install.py branch test_branch) |
11 | 11 | #if branch doesnt exist clones the default_branch |
12 | | -def clone(repository, folder, default_branch, cwdp='', recursive = False): |
| 12 | +def clone(repository, folder, default_branch, cwdp='', recursive = False, destination_folder = None): |
13 | 13 | global branch |
14 | 14 | print("Cloning "+repository) |
15 | 15 | if recursive: |
16 | 16 | subprocess.call(['git', 'clone', '--recursive', repository], cwd='./'+cwdp) |
17 | 17 | else: |
18 | | - subprocess.call(['git', 'clone', repository], cwd='./'+cwdp) |
| 18 | + if destination_folder: |
| 19 | + subprocess.call(['git', 'clone', repository, destination_folder], cwd='./'+cwdp) |
| 20 | + else: |
| 21 | + subprocess.call(['git', 'clone', repository], cwd='./'+cwdp) |
19 | 22 | checkout(folder, default_branch, cwdp) |
20 | 23 |
|
21 | 24 | def checkout(folder, default_branch, cwdp): |
@@ -49,18 +52,23 @@ def main(argv): |
49 | 52 | clone('https://github.com/Neurosim-lab/netpyne.git','netpyne','ui') |
50 | 53 | subprocess.call(['pip', 'install', '-e', '.'], cwd='./netpyne/') |
51 | 54 |
|
52 | | -clone('https://github.com/openworm/org.geppetto.frontend.jupyter.git','org.geppetto.frontend.jupyter','development','', True ) |
53 | | -checkout('geppetto', 'development','org.geppetto.frontend.jupyter/src/jupyter_geppetto/') |
54 | | -clone('https://github.com/MetaCell/geppetto-netpyne.git','geppetto-netpyne','development','org.geppetto.frontend.jupyter/src/jupyter_geppetto/geppetto/src/main/webapp/extensions/') |
| 55 | +clone('https://github.com/openworm/org.geppetto.frontend.jupyter.git','org.geppetto.frontend.jupyter','development') |
| 56 | +subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js') |
| 57 | +subprocess.call(['npm', 'run', 'build-dev'], cwd='./org.geppetto.frontend.jupyter/js') |
| 58 | + |
| 59 | +#subprocess.call(['git', 'submodule', 'update', '--init'], cwd='./') |
| 60 | +clone('https://github.com/openworm/org.geppetto.frontend.git','geppetto','development','netpyne_ui/', False, 'geppetto') |
| 61 | +# checkout('geppetto', 'development','org.geppetto.frontend.jupyter/src/jupyter_geppetto/') |
| 62 | +clone('https://github.com/MetaCell/geppetto-netpyne.git','geppetto-netpyne','development','netpyne_ui/geppetto/src/main/webapp/extensions/') |
55 | 63 |
|
56 | 64 | print("Enabling Geppetto NetPyNE Extension ...") |
57 | 65 | geppetto_configuration = os.path.join(os.path.dirname(__file__), './utilities/GeppettoConfiguration.json') |
58 | | -copyfile(geppetto_configuration, './org.geppetto.frontend.jupyter/src/jupyter_geppetto/geppetto/src/main/webapp/GeppettoConfiguration.json') |
| 66 | +copyfile(geppetto_configuration, './netpyne_ui/geppetto/src/main/webapp/GeppettoConfiguration.json') |
59 | 67 |
|
60 | 68 | # Installing and building |
61 | 69 | print("NPM Install and build for Geppetto Frontend ...") |
62 | | -subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/src/jupyter_geppetto/geppetto/src/main/webapp/') |
63 | | -subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='./org.geppetto.frontend.jupyter/src/jupyter_geppetto/geppetto/src/main/webapp/') |
| 70 | +subprocess.call(['npm', 'install'], cwd='./netpyne_ui/geppetto/src/main/webapp/') |
| 71 | +subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='./netpyne_ui/geppetto/src/main/webapp/') |
64 | 72 |
|
65 | 73 | print("Installing jupyter_geppetto python package ...") |
66 | 74 | subprocess.call(['pip', 'install', '-e', '.'], cwd='./org.geppetto.frontend.jupyter') |
|
0 commit comments