Skip to content

Commit 6ccd6f5

Browse files
authored
Merge pull request #133 from MetaCell/feature/130
Feature/130
2 parents f4c002a + 1f144d7 commit 6ccd6f5

128 files changed

Lines changed: 32921 additions & 91 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ netpyne
1010
Dockerfile
1111
Dockerfile_base
1212
Dockerfile_dev
13-
netpyne_workspace
13+
netpyne_workspace
14+
webapp/node_modules
15+
webapp/build
16+
webapp/geppetto-client

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ netpyne/
99
org.geppetto.frontend.jupyter/
1010
*.ipynb
1111
init.py
12+
webapp/node_modules
13+
webapp/geppetto-client
14+
webapp/build
15+
tests
16+
netpyne_workspace
17+
Dockerfile_mini
1218
npm*
1319
.vscode
1420
app.log

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,14 @@
11
language: python
22
os: linux
3-
sudo: false
43
dist: trusty
5-
bundler_args: --retry 5
64
node_js:
75
- "7"
86
env:
97
global:
108
secure: dn0FPQ5IG4M/3kdwnyI78ElQ308Vc3QnKAvkWfwMFb8QxDqxQdnTo7AV1qTMtbLrDNkeEWIgi4nc7jmXNtvGTwOfhAULVh6606Qs5B+ezTdwzajbbFMI8SKQx/pnTojOMu8dx7V4lMoR/YWcojR0VC1IWVC62TGbSB1k5BDGgH0=
11-
before_install:
12-
- sudo apt-get install -y xserver-xorg-dev libxext-dev libxi-dev
13-
install:
14-
- git clone --quiet https://github.com/MetaCell/geppetto-netpyne.git
15-
- cd geppetto-netpyne
16-
- if [ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi
17-
- cd ..
18-
- npm install --silent -g phantomjs
19-
- npm install --silent -g casperjs
20-
- npm install --silent -g slimerjs
21-
- npm install --silent -g gl
22-
python:
23-
- "2.7"
24-
- "3.5"
25-
edge: true
269
notifications:
2710
slack: metacell:5ALSeoP88DqIhORUJvxE56sq
2811
services:
29-
- docker
30-
addons:
31-
firefox: "58.0"
32-
apt:
33-
packages:
34-
- mesa-utils
35-
- xvfb
36-
- libgl1-mesa-dri
37-
- libglapi-mesa
38-
- libosmesa6
39-
40-
before_script:
41-
- "export DISPLAY=:99.0"
42-
- "sh -e /etc/init.d/xvfb start"
43-
- export SLIMERJSLAUNCHER=/home/travis/firefox-58.0/firefox/firefox
44-
- export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
45-
12+
- docker
4613
script:
47-
- travis_retry docker build -t="netpyne-ui" --build-arg branch=$TRAVIS_BRANCH -f="./Dockerfile_dev" .
48-
- travis_retry docker run -t -dit --name=netpyne-ui_container -h localhost -p 8888:8888 netpyne-ui:latest
49-
- cd $TRAVIS_BUILD_DIR/ && ls
50-
- cd geppetto-netpyne && ls
51-
- cd tests
52-
- bash utilities/netpyne-server-status.sh
53-
- sleep 30
54-
- http_status=$(curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'})
55-
- echo "$http_status"
56-
- while [ "$http_status" == "404" ]; do
57-
echo "Restart run";
58-
echo "Printing logs for debugging purposes";
59-
docker stop $(docker ps -a -q);
60-
docker rm $(docker ps -a -q);
61-
docker run -t -dit --name=netpyne-ui_container -h localhost -p 8888:8888 netpyne-ui:latest
62-
bash utilities/netpyne-server-status.sh
63-
sleep 30;
64-
http_status=$(curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'})
65-
echo "Done restarting";
66-
echo "$http_status";
67-
done;
68-
- http_status=$(curl -s -I $1 http://localhost:28081 | grep HTTP/1.1 | awk {'print $2'})
69-
- echo "$http_status";
70-
- "curl -s -I $1 http://localhost:8888/geppetto | grep HTTP/1.1 | awk {'print $2'}"
71-
- firefox --version
72-
- travis_retry xvfb-run -a --server-args="-screen 0 1024x768x24" casperjs test netpyne-tests.js --host=http://localhost:8888/ --engine=slimerjs
73-
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
74-
- docker logs -t netpyne-ui_container
75-
- docker stop $(docker ps -a -q)
76-
- docker rm $(docker ps -a -q)
14+
- travis_retry docker build -t="netpyne-ui" --build-arg branch=$TRAVIS_BRANCH -f="./Dockerfile_dev" .

k8s/cf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ steps:
124124
- CHART_NAME=jupyterhub
125125
- RELEASE_NAME=${{RELEASE_NAME}}
126126
- KUBE_CONTEXT=geppetto-cluster@metacellllc
127-
- NAMESPACE=netpyne
127+
- NAMESPACE=${{NAMESPACE}}
128128
- TILLER_NAMESPACE=kube-system
129129
- CHART_VERSION=0.9.0-beta.4
130130
- 'CHART_REPO_URL=https://jupyterhub.github.io/helm-chart/'

netpyne_ui/geppetto

Lines changed: 0 additions & 1 deletion
This file was deleted.

utilities/install.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,11 @@ def main(argv):
6969
# We can't clone org.geppetto.frontend as a regular submodule because Travis doesn't have .gitmodules in the zip
7070
# subprocess.call(['git', 'submodule', 'update', '--init'], cwd='./')
7171
clone_repo(project='openworm',
72-
repo_name='org.geppetto.frontend',
73-
folder='geppetto',
74-
default_branch='feature/127',
75-
cwdp='netpyne_ui/',
72+
repo_name='geppetto-client',
73+
folder='geppetto-client',
74+
default_branch='feature/178',
75+
cwdp='webapp/',
7676
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/'
8577
)
8678

8779
branch = None
@@ -106,15 +98,12 @@ def main(argv):
10698
subprocess.call(['npm', 'install'], cwd='./org.geppetto.frontend.jupyter/js', stdout=stdout)
10799
subprocess.call(['npm', 'run', 'build-dev'], cwd='./org.geppetto.frontend.jupyter/js')
108100

109-
print("Enabling Geppetto NetPyNE Extension ...")
110-
geppetto_configuration = os.path.join(os.path.dirname(__file__), './utilities/GeppettoConfiguration.copyme.json')
111-
copyfile(geppetto_configuration, './netpyne_ui/geppetto/src/main/webapp/GeppettoConfiguration.json')
112101

113102
# Installing and building
114103
print("NPM Install and build for Geppetto Frontend ...")
115104
with open('npm_frontend_log', 'a') as stdout:
116-
subprocess.call(['npm', 'install'], cwd='./netpyne_ui/geppetto/src/main/webapp/', stdout=stdout)
117-
subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='./netpyne_ui/geppetto/src/main/webapp/')
105+
subprocess.call(['npm', 'install'], cwd='webapp/', stdout=stdout)
106+
subprocess.call(['npm', 'run', 'build-dev-noTest'], cwd='webapp/')
118107

119108
print("Installing jupyter_geppetto python package ...")
120109
subprocess.call(['python3', '-m', 'pip', 'install', '-e', '.'], cwd='./org.geppetto.frontend.jupyter')

webapp/.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
etc/*
2+
node/*
3+
build/*
4+
META-INF/*
5+
**/tests/casperjs/**/*.js
6+
**/tests/jest-puppeteer/**/*.js
7+
**/*min.js
8+
geppetto-client/**
9+
node_modules/**

webapp/.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
extends: [
3+
"./node_modules/@geppettoengine/geppetto-client/.eslintrc.js",
4+
"plugin:jest/recommended"
5+
],
6+
plugins: ["jest"],
7+
globals: {
8+
page: true,
9+
browser: true,
10+
context: true,
11+
jestPuppeteer: true,
12+
acnet2: true,
13+
c302: true,
14+
pvdr: true,
15+
net1: true,
16+
CanvasContainer: true,
17+
patchRequire: true
18+
}
19+
};

webapp/.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>geppetto-application</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
</natures>
11+
</projectDescription>

0 commit comments

Comments
 (0)