Skip to content

Commit 5e0fd30

Browse files
author
Lucas Rebscher
authored
Merge pull request #330 from MetaCell/release/0.7.0
Release/0.7.0
2 parents 0096c66 + e97cc1c commit 5e0fd30

File tree

336 files changed

+21777
-1035039
lines changed

Some content is hidden

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

336 files changed

+21777
-1035039
lines changed

.dockerignore

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@ org.geppetto.frontend.jupyter
22
pygeppetto
33
.vscode
44
.ipynb_checkpoints
5-
netpyne_ui/geppetto
5+
66
*.egg-info
77
notebook.ipynb
88
.git
9-
netpyne
9+
1010
Dockerfile
1111
Dockerfile_base
1212
Dockerfile_dev
13-
netpyne_workspace
14-
webapp/node_modules
13+
node_modules
1514
webapp/build
1615
webapp/geppetto-client
16+
workspace
17+
netpyne_workspace
18+
.idea
1719
k8s
18-
src
19-
x86_64
20+
/src
21+
x86_64
22+
app.log
23+
/.pytest_cache
24+
.jupyter-config
25+
**/*.pyc
26+
**/__pycache__

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ init.py
1313
webapp/node_modules
1414
webapp/geppetto-client
1515
webapp/build
16+
workspace
1617
netpyne_workspace
18+
tests/frontend/e2e/node_modules
1719
Dockerfile_mini
1820
npm*
1921
.vscode
2022
app.log
2123
utilities/x86_64
2224
.idea
25+
*.iml
2326
x86_64
27+
.jupyter-config

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ python:
44
- "3.7"
55
node_js:
66
- "12"
7+
cache: pip
78
env:
89
global:
910
- secure: dn0FPQ5IG4M/3kdwnyI78ElQ308Vc3QnKAvkWfwMFb8QxDqxQdnTo7AV1qTMtbLrDNkeEWIgi4nc7jmXNtvGTwOfhAULVh6606Qs5B+ezTdwzajbbFMI8SKQx/pnTojOMu8dx7V4lMoR/YWcojR0VC1IWVC62TGbSB1k5BDGgH0=
@@ -14,13 +15,13 @@ notifications:
1415
install:
1516
- sudo apt-get install libgnutls28-dev
1617
- sudo apt install libcurl4-openssl-dev libssl-dev
17-
- sudo apt-get install python3-dev
18+
- sudo apt-get install python3-dev
1819
script:
19-
20-
- python utilities/install.py
20+
- python utilities/install.py
2121
- ./NetPyNE-UI &
2222
- http_status=$(curl -s -I $1 $LANDING_PAGE | grep HTTP/1.1 | awk {'print $2'})
2323
- echo "$http_status"
24-
- cd webapp
25-
- travis_retry npm run test -- --verbose --colors
24+
- cd tests/frontend/e2e
25+
- npm ci
26+
- sleep 10 && travis_retry npm run test
2627
- exit 0

Dockerfile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
FROM frodriguez4600/jupyter-neuron:v7.8.0
2+
ARG INSTALLATION_FOLDER=/home/jovyan/work/NetPyNE-UI
3+
ARG NETPYNE_VERSION=development
4+
ARG WORKSPACE_VERSION=nov2020
5+
ARG JUPYTER_GEPPETTO_VERSION=development
6+
ARG PYGEPPETTO_VERSION=development
7+
ARG BUILD_ARGS=""
8+
29
USER $NB_USER
310

4-
ARG branch=development
5-
RUN echo "$branch";
11+
ENV INSTALLATION_FOLDER=$INSTALLATION_FOLDER
12+
ENV NETPYNE_VERSION=$NETPYNE_VERSION
13+
ENV WORKSPACE_VERSION=$WORKSPACE_VERSION
14+
ENV JUPYTER_GEPPETTO_VERSION=$JUPYTER_GEPPETTO_VERSION
15+
ENV PYGEPPETTO_VERSION=$PYGEPPETTO_VERSION
16+
ENV BUILD_ARGS=$BUILD_ARGS
617

7-
ENV INSTALLATION_FOLDER=/home/jovyan/work/NetPyNE-UI
818
WORKDIR /home/jovyan/work
19+
COPY --chown=1000:1000 requirements.txt ${INSTALLATION_FOLDER}/requirements.txt
20+
21+
WORKDIR ${INSTALLATION_FOLDER}
22+
RUN pip install -r requirements.txt
923

10-
COPY --chown=1000:1000 . NetPyNE-UI
24+
COPY --chown=1000:1000 . .
1125
WORKDIR ${INSTALLATION_FOLDER}/utilities
1226

13-
RUN python install.py branch $branch
27+
RUN python install.py ${BUILD_ARGS}
1428

1529
WORKDIR ${INSTALLATION_FOLDER}
1630

31+
RUN pip install -r requirements-test.txt
32+
RUN pytest tests/backend
1733
CMD /bin/bash -c "jupyter notebook --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui --NotebookApp.disable_check_xsrf=True"

NetPyNE-UI

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
#!/bin/sh
2+
CONFIG=$(pwd)/.jupyter-config
3+
export JUPYTER_CONFIG_DIR=$CONFIG
24
exec jupyter notebook --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui --NotebookApp.disable_check_xsrf=True

README.md

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,77 @@ conda activate netpyne
4242
### Run install script
4343

4444
```bash
45-
git clone https://github.com/MetaCell/NetPyNE-UI.git
46-
cd utilities
47-
python install.py
48-
cd ..
45+
python utilities/install.py
46+
```
47+
48+
### Start application
49+
50+
```bash
4951
./NetPyNE-UI
5052
```
5153

52-
### To update sources
54+
For debugging you can use `run.py` instead
5355

5456
```bash
55-
python update.py
57+
python run.py
5658
```
5759

58-
NetPyNE-UI is being developed in collaboration with the [Neurosim Lab](http://neurosimlab.org/).
59-
See the [Wiki](https://github.com/MetaCell/NetPyNE-UI/wiki) for more info!
6060

61+
## Run NetPyNE User Interface in Docker
62+
63+
Ensure that you have Docker installed on your system.
64+
65+
Build the image
66+
67+
```bash
68+
docker build -t netpyne-ui
69+
```
70+
71+
Run the image
72+
73+
```bash
74+
docker run -p 8888:8888 netpyne-ui
75+
```
76+
77+
## End-to-end tests
78+
79+
End-to-end tests are located in `tests/deployment/frontend/e2e`.
80+
Ensure that the application is running in a blank state, since end-to-end tests interact with the running application.
81+
82+
Install packages
83+
84+
```bash
85+
cd tests/frontend/e2e
86+
npm install
87+
```
88+
89+
Start tests
90+
91+
```bash
92+
npm run test
93+
```
94+
95+
96+
#### Containerized tests
97+
98+
You can also use `docker-compose` to run the tests.
99+
Ensure that you have Docker installed on your system.
100+
101+
Build the images
102+
103+
```bash
104+
cd tests/deployment
105+
sh build.sh
106+
```
107+
108+
Run the tests
109+
110+
```bash
111+
docker-compose up --abort-on-container-exit --exit-code-from netpyne-ui-e2e
112+
```
113+
114+
115+
## Additional Notes
116+
117+
NetPyNE-UI is being developed in collaboration with the [Neurosim Lab](http://neurosimlab.org/).
118+
See the [Wiki](https://github.com/MetaCell/NetPyNE-UI/wiki) for more info!

docs/NetPyNe.png

-26.8 KB
Binary file not shown.

docs/netpyne.png

-36.4 KB
Loading

jupyter_hub/Dockerfile_spawner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN /bin/bash -c "source activate snakes && python --version"
2121
RUN /bin/bash -c "source activate snakes && exec python install.py branch $netpyneuiBranch"
2222
WORKDIR /home/jovyan
2323
RUN git clone https://github.com/Neurosim-lab/netpyne_workspace
24-
WORKDIR /home/jovyan/netpyne_workspace
24+
WORKDIR /home/jovyan/workspace
2525
RUN ln -sfn /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/netpyne_ui/tests tests
2626

2727
# Copy jupyterhub_config

k8s/cf_pipeline.yaml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,33 @@ steps:
1010
repo: "MetaCell/NetPyNE-UI"
1111
revision: "${{CF_BRANCH}}"
1212
stage: "clone"
13-
when:
14-
branch:
15-
only:
16-
- "${{CF_BRANCH}}"
1713
BuildingNetPyNE-UI:
1814
title: Building NetPyNE-UI
1915
type: build
2016
stage: build
2117
image_name: netpyne-ui
2218
working_directory: ${{main_clone}}
23-
tag: '${{CF_SHORT_REVISION}}'
19+
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}-${{CF_BUILD_TIMESTAMP}}'
2420
build_arguments:
25-
- branch=${{CF_BRANCH}}
21+
- NETPYNE_VERSION=${{NETPYNE_VERSION}}
22+
- WORKSPACE_VERSION=${{WORKSPACE_VERSION}}
23+
- PYGEPPETTO_VERSION=${{PYGEPPETTO_VERSION}}
24+
- JUPYTER_GEPPETTO_VERSION=${{JUPYTER_GEPPETTO_VERSION}}
25+
- BUILD_ARGS=${{BUILD_ARGS}}
2626
registry: ${{REGISTRY}}
27-
when:
28-
branch:
29-
only:
30-
- "${{CF_BRANCH}}"
3127
BuildingHub:
3228
title: Building Hub
3329
type: build
3430
stage: "build"
3531
image_name: netpyne-hub
3632
working_directory: k8s
37-
tag: '${{CF_SHORT_REVISION}}'
33+
tag: '${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}-${{CF_BUILD_TIMESTAMP}}'
3834
registry: ${{REGISTRY}}
39-
when:
40-
branch:
41-
only:
42-
- "${{CF_BRANCH}}"
4335
installing_chart:
4436
type: helm
4537
stage: deploy
4638
title: "Deploy chart"
47-
working_directory: NetPyNE-UI/k8s
39+
working_directory: k8s
4840
arguments:
4941
action: install
5042
chart_name: jupyterhub
@@ -57,6 +49,8 @@ steps:
5749
custom_value_files:
5850
- 'cf_values.yaml'
5951
custom_values:
60-
- 'hub_image_tag=${{CF_SHORT_REVISION}}'
61-
- 'singleuser_image_tag=${{CF_SHORT_REVISION}}'
62-
- 'proxy_secretToken=${{SECRET_TOKEN}}'
52+
- 'hub_image_tag=${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}-${{CF_BUILD_TIMESTAMP}}'
53+
- 'singleuser_image_tag=${{CF_BRANCH_TAG_NORMALIZED}}-${{CF_SHORT_REVISION}}-${{CF_BUILD_TIMESTAMP}}'
54+
- 'singleuser_memory_limit=${{MEMORY_MAX}}'
55+
- 'singleuser_memory_guarantee=${{MEMORY_MIN}}'
56+
- 'proxy_secretToken=${{SECRET_TOKEN}}'

0 commit comments

Comments
 (0)