Skip to content

Commit 91edecc

Browse files
author
Lucas Rebscher
authored
Merge pull request #292 from MetaCell/feature/277
Feature/277: Fix reloading workspace mod files
2 parents 5730e71 + ce639e2 commit 91edecc

155 files changed

Lines changed: 133 additions & 1023996 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: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@ 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-
webapp/node_modules
13+
node_modules
1414
webapp/build
1515
webapp/geppetto-client
16-
netpyne_workspace
17-
tests
16+
workspace
17+
.idea
1818
k8s
19-
src
20-
x86_64
19+
/src
20+
x86_64
21+
app.log
22+
/.pytest_cache
23+
.jupyter-config
24+
**/*.pyc
25+
**/__pycache__

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ init.py
1313
webapp/node_modules
1414
webapp/geppetto-client
1515
webapp/build
16-
netpyne_workspace
16+
workspace
1717
tests/frontend/e2e/node_modules
1818
Dockerfile_mini
1919
npm*

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,6 @@ RUN python install.py ${BUILD_ARGS}
2828

2929
WORKDIR ${INSTALLATION_FOLDER}
3030

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

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

netpyne_ui/constants.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import os
22

33
UPLOAD_FOLDER_NAME = 'uploads'
4-
NETPYNE_WORKDIR = 'netpyne_workspace'
4+
NETPYNE_WORKDIR = 'workspace'
55

66
ALLOWED_EXTENSIONS = ["py", "zip", "gz", ".tar.gz", "pdf", "txt", "xls", "png", "jpeg", "hoc"]
7+
HERE = os.path.dirname(os.path.abspath(__file__))
8+
ROOT = os.path.dirname(HERE)
9+
UPLOAD_FOLDER_PATH = os.path.join(ROOT, NETPYNE_WORKDIR, UPLOAD_FOLDER_NAME)
10+
NETPYNE_WORKDIR_PATH = os.path.join(ROOT, NETPYNE_WORKDIR)
711

8-
UPLOAD_FOLDER_PATH = os.path.join(os.getcwd(), NETPYNE_WORKDIR, UPLOAD_FOLDER_NAME)
9-
NETPYNE_WORKDIR_PATH = os.path.join(os.getcwd(), NETPYNE_WORKDIR)
12+
if not os.path.exists(NETPYNE_WORKDIR_PATH):
13+
NETPYNE_WORKDIR_PATH = os.path.join(os.getcwd(), NETPYNE_WORKDIR)
14+
15+
if not os.path.exists(NETPYNE_WORKDIR_PATH):
16+
raise Exception(f"Workdir path {NETPYNE_WORKDIR_PATH} does not exist")
1017

1118
if not os.path.exists(UPLOAD_FOLDER_PATH):
1219
os.makedirs(UPLOAD_FOLDER_PATH)

netpyne_ui/examples/M1detailed/M1detailed.json

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

netpyne_ui/examples/M1detailed/README

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

netpyne_ui/examples/M1detailed/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)