Skip to content

Commit

Permalink
Made a number of minor improvements and copied some things from the o…
Browse files Browse the repository at this point in the history
…riginal

cookiecutter project

Signed-off-by: Nick Leaf <[email protected]>
  • Loading branch information
nleaf-nv committed Jan 28, 2020
1 parent ae848ec commit cb18b62
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ node_modules/

# Compiled javascript
ipyparaview/static/
js/package-lock.json

# OS X
.DS_Store
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ For a regular user installation:
$ pip install git+https://github.com/NVIDIA/ipyparaview.git
$ jupyter nbextension enable --py --sys-prefix ipyparaview

To install for jupyterlab

For a development installation:
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
$ jupyter labextension install ipyparaview

For a development installation (requires npm),

$ git clone https://github.com/NVIDIA/ipyparaview.git
$ cd ipyparaview
Expand Down
12 changes: 7 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

python setup.py build \
&& pip install -e . \
&& jupyter nbextension install --py --symlink --sys-prefix ipyparaview \
&& jupyter nbextension enable --py --sys-prefix ipyparaview \
&& jupyter labextension install js
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

pip install -e . \
&& jupyter nbextension install --py --symlink --sys-prefix ipyparaview \
&& jupyter nbextension enable --py --sys-prefix ipyparaview \
&& jupyter labextension install @jupyter-widgets/jupyterlab-manager \
&& jupyter labextension install js
16 changes: 16 additions & 0 deletions ipyparaview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@
from .widgets import *

def _jupyter_nbextension_paths():
"""Called by Jupyter Notebook Server to detect if it is a valid nbextension and
to install the widget
Returns
=======
section: The section of the Jupyter Notebook Server to change.
Must be 'notebook' for widget extensions
src: Source directory name to copy files from. Webpack outputs generated files
into this directory and Jupyter Notebook copies from this directory during
widget installation
dest: Destination directory name to install widget files to. Jupyter Notebook copies
from `src` directory into <jupyter path>/nbextensions/<dest> directory
during widget installation
require: Path to importable AMD Javascript module inside the
<jupyter path>/nbextensions/<dest> directory
"""
return [{
'section': 'notebook',
'src': 'static',
Expand Down
3 changes: 3 additions & 0 deletions ipyparaview/_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Module version
version_info = (0, 1, 0, 'alpha', 0)

# Module version stage suffix map
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}

# Module version accessible using ipyparaview.__version__
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
2 changes: 1 addition & 1 deletion js/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A widget for interactive server-side ParaView rendering
iPython widget for server-side ParaView rendering in Jupyter.

Package Install
---------------
Expand Down

0 comments on commit cb18b62

Please sign in to comment.