Skip to content

Commit b7cd8fa

Browse files
authored
Merge pull request #107 from MetaCell/release/0.2.0
Release/0.2.0
2 parents efcb466 + c2cdbc4 commit b7cd8fa

166 files changed

Lines changed: 31307 additions & 665 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.

.coveragerc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[report]
2+
exclude_lines =
3+
pytest: no cover
4+
omit =
5+
nwb_explorer/nwb_main.py

.dockerignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.idea/
2+
.vscode/
3+
*pyc
4+
/static/
5+
/dependencies/
6+
/webapp/build/
7+
/webapp/node_modules/
8+
/webapp/geppetto-client/
9+
.DS_Store
10+
*.egg-info/
11+
*.nwb
12+
.ipynb_checkpoints
13+
*.log
14+
holoviews_plots
15+
nwb_files_cache
16+
test_data
17+
*.ipynb
18+
.pytest_cache
19+
.tox
20+
tox.ini
21+
.coverage
22+
/src
23+
geppetto-client
24+
.git
25+
**/__pycache__

.gitignore

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
.idea/
22
.vscode/
33
*pyc
4-
static/org.geppetto.frontend/
4+
/static/
5+
/dependencies/
6+
/webapp/build/
7+
/webapp/node_modules/
8+
/webapp/geppetto-client/
59
.DS_Store
6-
*.nwb
10+
*.egg-info/
11+
*.nwb
12+
.ipynb_checkpoints
13+
*.log
14+
holoviews_plots
15+
nwb_files_cache
16+
test_data
17+
*.ipynb
18+
.pytest_cache
19+
.tox
20+
tox.ini
21+
.coverage
22+
/src
23+
geppetto-client

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: node_js
2+
node_js:
3+
- "9"
4+
cache:
5+
- pip
6+
- npm
7+
before_install:
8+
- pyenv local 3.7.1
9+
install:
10+
- pip install --upgrade pip
11+
- pip install codecov
12+
script:
13+
- cd utilities
14+
- python install.py branch ${TRAVIS_BRANCH}
15+
- cd ..
16+
- python -m pytest --cov=nwb_explorer --cov-report term
17+
after_success:
18+
- codecov

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM metacell/jupyter-neuron:development
2+
3+
ENV FOLDER=nwb-explorer
4+
5+
USER root
6+
RUN apt-get update -qq &&\
7+
apt-get install python3-tk vim nano unzip -qq
8+
USER $NB_UID
9+
10+
RUN jupyter labextension disable @jupyterlab/hub-extension
11+
12+
COPY --chown=1000:1000 . ${FOLDER}
13+
14+
RUN python $FOLDER/utilities/install.py
15+
16+
WORKDIR $HOME/$FOLDER
17+
18+
EXPOSE 8000
19+
20+
CMD ./NWBE

GeppettoConfiguration.json

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

LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2018, 2019 MetaCell LLC, Ltd.
4+
http://metacell.us
5+
6+
All rights reserved. This program and the accompanying materials
7+
are made available under the terms of the MIT License
8+
which accompanies this distribution, and is available at
9+
http://opensource.org/licenses/MIT
10+
11+
Permission is hereby granted, free of charge, to any person obtaining a copy
12+
of this software and associated documentation files (the "Software"), to deal
13+
in the Software without restriction, including without limitation the rights
14+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15+
copies of the Software, and to permit persons to whom the Software is
16+
furnished to do so, subject to the following conditions:
17+
18+
The above copyright notice and this permission notice shall be included in all
19+
copies or substantial portions of the Software.
20+
21+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
26+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
27+
USE OR OTHER DEALINGS IN THE SOFTWARE.

NWBE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
exec jupyter notebook --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=nwb_explorer

README.md

Lines changed: 88 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,127 @@
1+
[![Build Status](https://travis-ci.org/MetaCell/nwb-explorer.svg?branch=master)](https://travis-ci.org/MetaCell/nwb-explorer)
2+
[![codecov](https://codecov.io/gh/MetaCell/nwb-explorer/branch/master/graph/badge.svg)](https://codecov.io/gh/MetaCell/nwb-explorer)
3+
[![Twitter Follow](https://img.shields.io/twitter/follow/metacell.svg?label=follow&style=social)](https://twitter.com/metacell)
4+
15
# NWB Explorer
26

3-
NWB Explorer is an application that can be used by scientists to read, visualize and explore
4-
the content of NWB 2 files.
7+
NWB Explorer is a web application that can be used by scientists to read, visualize and explore
8+
the content of NWB:N 2 files.
9+
10+
Learn more about the [Neurodata Without Borders](https://www.nwb.org/).
511

612
## Getting Started
713

8-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
14+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
15+
16+
### Prerequisites
17+
18+
Below you will find the software you need to install to use nwb explorer (and the versions we used):
919

10-
### Prerequisites
11-
Below you will find the software you need to install to use nwb explorer (and the versions we used)
1220
* Git (2.17.0).
1321
* Node (9.11.1) and npm (6.0.0).
14-
* Redis-Server (4.0.9).
15-
* Python 3 (3.6.5), pip (10.0.1) and Python3-tk.
22+
* Python 3 (3.6+), pip (10.0.1)
23+
1624
#### Python Dependencies
17-
`pip install -r requirements.txt`
1825

19-
or
26+
We recommend the use of a new python 3 virtual environment:
2027

21-
* Django (1.11.7). `pip install django`
22-
* Pygeppeto_server. ```git clone https://github.com/MetaCell/pygeppetto-django.git && cd pygeppetto-django && git checkout development && pip install -e . ```
23-
* Pygeppeto_model.```git clone https://github.com/openworm/pygeppetto.git && cd pygeppetto && git checkout manager && pip install -e . ```
24-
* Pyecore (0.8.1). `pip install pyecore`
25-
* Pynwb. ```git clone https://github.com/NeurodataWithoutBorders/pynwb.git && cd pynwb && git checkout dev && pip install -e . ```
26-
* Seaborn (0.8.1). `pip install seaborn`
27-
28-
### Installing
28+
```bash
29+
python3 -m venv nwb-explorer
30+
source nwb-explorer/bin/activate
31+
```
2932

30-
A step by step instructions to get a development env running
33+
Or, with conda
3134

35+
```bash
36+
conda create -n nwb-explorer python=3.7
37+
conda activate nwb-explorer
3238
```
33-
git clone https://github.com/tarelli/nwb-explorer
39+
40+
### Local installation
41+
42+
Instructions to get a development environment running.
43+
44+
```bash
45+
git clone -b development https://github.com/MetaCell/nwb-explorer
3446
cd nwb-explorer
35-
mkdir static
36-
cd static
37-
git clone https://github.com/openworm/org.geppetto.frontend
38-
cd org.geppetto.frontend/src/main/webapp/extensions
39-
git clone https://github.com/tarelli/geppetto-nwbexplorer
40-
cd ..
41-
/bin/cp -rf ../../../../../GeppettoConfiguration.json .
42-
npm install
43-
npm run build-dev-noTest
47+
python utilities/install.py
4448
```
45-
## Deployment
4649

47-
Run the redis-server manually:
50+
## How to run NWB Explorer
4851

49-
OSX
50-
```
51-
nohup redis-server &
52-
```
53-
Linux
54-
```
55-
redis-server &
56-
```
57-
Then, on the nwb-explorer folder, run :
58-
```
59-
python manage.py runserver
52+
After the installation is complete, run the script:
53+
54+
```bash
55+
cd nwb-explorer
56+
./NWBE
6057
```
6158

62-
## How to use
59+
If everything worked, the default browser will open on `http://localhost:8888/geppetto`
6360

64-
![Real plots](https://github.com/NeurodataWithoutBorders/nwb_hackathons/raw/master/HCK04_2018_Seattle/Projects/NWBExplorer/nwbexplorer.gif)
65-
## How to develop
61+
## Getting started with NWB Explorer
6662

67-
Any change you make in the python code will be automatically redeployed by the Django server.
63+
When the application is started, no file will be loaded.
6864

69-
JS/HTML code can be found inside `static/org.geppetto.frontend/src/main/webapp/`. The code needs to be rebuilt with webpack everytime there is a change. The recommended way is to run in `/static/org.geppetto.frontend/src/main/webapp/` this command:
65+
1. Use the interface to load the file from a public url or just load a sample
66+
1. Specify the parameter nwbfile in your browser. Example: `http://localhost:8888/geppetto?nwbfile=https://github.com/OpenSourceBrain/NWBShowcase/raw/master/NWB/time_series_data.nwb`
67+
68+
After the file is loaded, a Jupyter notebook will be available.
69+
From the notebook the current loaded file can be accessed through the variable `nwbfile`.
70+
For further information about the Python API, see the [PyNWB docs](https://pynwb.readthedocs.io/en/stable/)
71+
72+
### Python code from sources
73+
74+
In order to have all the Python files NWB:N 2 ed from sources, the application and the dependencies must be installed in development mode, i.e. with the command
75+
76+
```bash
77+
pip install -e .
7078
```
79+
80+
### Javascript code from sources
81+
82+
JS/HTML code can be found inside `static/org.geppetto.frontend/src/main/webapp/`. The code needs to be rebuilt with webpack everytime there is a change. To avoid having to do so you can use the Webpack development server running in `/static/org.geppetto.frontend/src/main/webapp/` this command:
83+
84+
```bash
7185
npm run build-dev-noTest:watch
7286
```
7387

74-
## Running the tests
88+
This will spawn a process that while left running will watch for any changes on the `webapp` folder and automatically deploy them each time a file is saved.
7589

90+
To check if a dependency is installed in development mode, run `pip list`.
91+
92+
### Run via Docker
93+
94+
There is a dockerfile ready to build a container for NWB-Explorer:
95+
96+
```bash
97+
cd nwb-explorer/k8s
98+
docker build -t nwb-explorer .
99+
docker run -it -p8888:8888 nwb-explorer
76100
```
77-
python manage.py test
78-
```
101+
Then, after the docker contained has started, the application is ready http://localhost:8888/geppetto
102+
79103
## Built With
80104

81-
* [Django](https://www.djangoproject.com/) - The web framework used
82-
* [Geppetto](http://www.geppetto.org/) - Used to build a web-based application to visualize and simulate the NWB 2.0 files.
105+
* [Geppetto](http://www.geppetto.org/) - Used to build a web-based application to interpret and visualize the NWB:N 2 files.
106+
* [PyNWB](https://github.com/NeurodataWithoutBorders/pynwb) - Used to read and manipulate NWB:N 2 files
107+
* [Jupyter notebook](https://jupyter.org/) - Jupyter notebook is used as a backend.
83108

84109

110+
## Background
111+
112+
The NWB Explorer was initially created by MetaCell to showcase the features of the Geppetto platform to share
113+
neurophysiological data in Neurodata Without Borders format. It was further developed as part of a
114+
Google Summer of Code project with the OpenWorm project. It is currently being extended as part of the Open Source Brain
115+
project to provide both a standalone and online application for visualising and analysing the contents of NWB:N 2 files.
116+
This work is currently funded by the Wellcome Trust.
117+
85118
## Authors
86119

87120
* Matteo Cantarelli ([MetaCell](http://metacell.us))
88121
* Giovanni Idili ([MetaCell](http://metacell.us))
89-
* Afonso Pinto
90-
91-
See also the list of [contributors](https://github.com/tarelli/nwb-explorer/contributors) who participated in this project.
92-
122+
* Filippo Ledda ([MetaCell](http://metacell.us))
123+
* Rodriguez Facundo ([MetaCell](http://metacell.us))
124+
* Afonso Pinto ([MetaCell](http://metacell.us))
93125

94126

127+
See also the list of [contributors](https://github.com/Metacell/nwb-explorer/contributors) who participated in this project.

db.sqlite3

-128 KB
Binary file not shown.

0 commit comments

Comments
 (0)