-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into include-custom-widgets
- Loading branch information
Showing
45 changed files
with
1,279 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.8" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/source/conf.py | ||
fail_on_warning: false # Eventually, you'll want this to be true | ||
|
||
# Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: requirements-rtd.txt | ||
- method: pip | ||
path: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.10 | ||
|
||
RUN cd .. | ||
COPY requirements.txt . | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r requirements.txt \ | ||
&& pip install git+https://github.com/NeurodataWithoutBorders/nwbwidgets.git | ||
|
||
COPY notebook.ipynb . | ||
RUN mkdir nwb-cache | ||
|
||
EXPOSE 8866 | ||
CMD ["voila", "notebook.ipynb", "--port=8866", "--Voila.ip=0.0.0.0", "--enable_nbextensions=True", "--autoreload=True", "--no-browser"] | ||
|
||
# EXPOSE 8888 | ||
# CMD ["jupyter", "notebook", "notebook.ipynb", "--port=8888", "--ip=0.0.0.0", "--no-browser", "--allow-root", "--NotebookApp.token=''"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Build Docker Image | ||
|
||
From `/docker` directory, run: | ||
```bash | ||
$ docker build -t nwbwidgets-voila . | ||
``` | ||
|
||
## Run Docker Image | ||
|
||
To run with `Panel`: | ||
```bash | ||
$ docker run -p 8866:8866 nwbwidgets-voila | ||
``` | ||
|
||
By default, the Panel will run with `enable_local_source=False` (see [Panel](https://nwb-widgets.readthedocs.io/en/latest/contents/quickstart.html#basic-usage-with-panel)). To allow for local files browsering, run the container with: | ||
```bash | ||
$ docker run -p 8866:8866 -e ENABLE_LOCAL_SOURCE=True nwbwidgets-voila | ||
``` | ||
|
||
To run for a specific NWB file, pass the s3 url as an ENV variable to the container: | ||
```bash | ||
$ docker run -p 8866:8866 -e S3_URL_NWBFILE=<s3_url_to_nwb_file> nwbwidgets-voila | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"\n", | ||
"\n", | ||
"s3_url = os.getenv(\"S3_URL_NWBFILE\", None)\n", | ||
"enable_local_source = bool(os.getenv(\"ENABLE_LOCAL_SOURCE\", False))\n", | ||
"\n", | ||
"if s3_url:\n", | ||
" from pynwb import NWBHDF5IO\n", | ||
" from nwbwidgets import nwb2widget\n", | ||
" from dandi.dandiapi import DandiAPIClient\n", | ||
" import h5py\n", | ||
" import fsspec\n", | ||
" from fsspec.implementations.cached import CachingFileSystem\n", | ||
" \n", | ||
" # Create a virtual filesystem based on the http protocol and use caching to save accessed data to RAM.\n", | ||
" fs = CachingFileSystem(\n", | ||
" fs=fsspec.filesystem(\"http\"),\n", | ||
" cache_storage=\"nwb-cache\", # Local folder for the cache\n", | ||
" )\n", | ||
" f = fs.open(s3_url, \"rb\")\n", | ||
" file = h5py.File(f)\n", | ||
" io = NWBHDF5IO(file=file, load_namespaces=True)\n", | ||
" nwbfile = io.read()\n", | ||
" w = nwb2widget(nwbfile)\n", | ||
"else:\n", | ||
" from nwbwidgets import Panel\n", | ||
" w = Panel(enable_local_source=enable_local_source)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"w" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.8.5 ('base')", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.8.5" | ||
}, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "698d109e506a444d1bfd677c8f66adf4920b11c19b28ee52fae9b02c95d46a98" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pynwb>=2.2.0 | ||
dandi>=0.46.6 | ||
nwbwidgets>=0.10.0 | ||
ndx-grayscalevolume==0.0.2 | ||
ndx-icephys-meta==0.1.0 | ||
ndx-spectrum==0.2.2 | ||
voila==0.3.6 | ||
numpy==1.23.3 | ||
matplotlib==3.6.1 | ||
scikit-image==0.19.3 | ||
plotly==5.10.0 | ||
ipydatagrid==1.1.13 | ||
ipydatawidgets==4.3.2 | ||
ipytree==0.2.2 | ||
ipyvolume==0.6.0a10 | ||
ipyvue==1.8.0 | ||
ipyvuetify==1.8.4 | ||
ipywebrtc==0.6.0 | ||
ipywidgets==7.7.2 | ||
ipykernel==6.16.0 | ||
ipympl==0.9.2 | ||
jupyter_client==7.4.2 | ||
jupyter_core==4.11.1 | ||
jupyter-server==1.21.0 | ||
jupyterlab==3.4.8 | ||
jupyterlab-pygments==0.2.2 | ||
jupyterlab_server==2.15.2 | ||
jupyterlab-widgets==1.1.1 | ||
tqdm>=4.36.0 | ||
zarr==2.13.3 | ||
aiohttp==3.8.3 | ||
tifffile==2022.10.10 | ||
trimesh==3.15.4 | ||
importlib-metadata<5.0 | ||
fsspec==2022.8.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Build documentation | ||
|
||
To run auto-doc for the API, from `/docs` run: | ||
```bash | ||
$ sphinx-apidoc -f -o ./source/api_reference ../nwbwidgets | ||
``` | ||
|
||
To build the HTML, from `/docs` run: | ||
```bash | ||
$ sphinx-build -b html ./source ./build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
nwbwidgets | ||
========== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
nwbwidgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
nwbwidgets.analysis package | ||
=========================== | ||
|
||
Submodules | ||
---------- | ||
|
||
nwbwidgets.analysis.spikes module | ||
--------------------------------- | ||
|
||
.. automodule:: nwbwidgets.analysis.spikes | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: nwbwidgets.analysis | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
nwbwidgets.controllers package | ||
============================== | ||
|
||
Submodules | ||
---------- | ||
|
||
nwbwidgets.controllers.group\_and\_sort\_controllers module | ||
----------------------------------------------------------- | ||
|
||
.. automodule:: nwbwidgets.controllers.group_and_sort_controllers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
nwbwidgets.controllers.misc module | ||
---------------------------------- | ||
|
||
.. automodule:: nwbwidgets.controllers.misc | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
nwbwidgets.controllers.time\_window\_controllers module | ||
------------------------------------------------------- | ||
|
||
.. automodule:: nwbwidgets.controllers.time_window_controllers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: nwbwidgets.controllers | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
nwbwidgets.dashboards package | ||
============================= | ||
|
||
Submodules | ||
---------- | ||
|
||
nwbwidgets.dashboards.allen module | ||
---------------------------------- | ||
|
||
.. automodule:: nwbwidgets.dashboards.allen | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: nwbwidgets.dashboards | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
Oops, something went wrong.