Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

WIP: Migrate to jupyter-js-services #127

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ dist/
node_modules/
.ipynb_checkpoints/
bower_components/
dashboard-lib/
__pycache__/
*.egg-info/
etc/notebooks/*
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.3.0 (2015-12-30)

* Make compatible with Jupyter Notebook 4.1.x
* Remove all download and deployment related backend code in. Refer users to the separate `jupyter_cms` and `jupyter_dashboards_bundlers` packages for these features.
* Keep compatible with Jupyter Notebook 4.0.x

## 0.2.2 (2015-12-15)

* Revert to old jupyter\_notebook\_server.py config hack to remain compatible with jupyter\_declarativewidgets and jupyter\_cms (until they change too)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

.PHONY: build clean configs dev dev-with-widgets help install js sdist system-test-local system-test-remote test
.PHONY: build clean configs dev dev-with-widgets help install js sdist system-test-local system-test-remote test

PYTHON?=python3

Expand Down Expand Up @@ -52,7 +52,7 @@ clean:
js:
@docker run -it --rm \
-v `pwd`:/src \
$(BOWER_REPO) bash -c 'cd /src && npm install && npm run bower'
$(BOWER_REPO) bash -c 'cd /src && npm install && npm run build'

dev: dev-$(PYTHON)

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Watch from minute 41 to 51 of the [September 1st Jupyter meeting video recording

## Prerequisites

* Jupyter Notebook 4.0.x running on Python 3.x or Python 2.7.x
* Jupyter Notebook 4.1.x or 4.0.x running on Python 3.x or Python 2.7.x
* Edge, Chrome, Firefox, or Safari

Note: If you're running IPython Notebook 3.2.x, you can install the older 0.1.x version of the extension.
Expand All @@ -23,6 +23,8 @@ Note: If you're running IPython Notebook 3.2.x, you can install the older 0.1.x

If you want to try the dashboard extension and demos without installing it yourself, visit the [jupyter-incubator/showcase binder](http://mybinder.org/repo/jupyter-incubator/showcase). If the binder site is full, try the tmpnb instance at [http://jupyter.cloudet.xyz](http://jupyter.cloudet.xyz).

Note that both of these deployments tend to lag the latest stable release.

## Install It

To get the basic dashboard layout and preview features in Jupyter Notebook:
Expand Down Expand Up @@ -52,7 +54,7 @@ Here is our near-term roadmap for improving the deployment options:
All this said, if you'd like to try external deployment today for your **non-production use case**, run the following. Then see the [jupyter-incubator/dashboards_bundlers](https://github.com/jupyter-incubator/dashboards_bundlers) README for details.

```bash
pip install jupyter_cms>=0.3.0
pip install 'jupyter_cms>=0.3.0'
pip install jupyter_dashboards_bundlers
```

Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
"directories": {
"test": "test"
},
"dependencies": {},
"dependencies": {
"jupyter-js-output-area": "^0.1.1",
"jupyter-js-services": "0.0.1"
},
"devDependencies": {
"autoprefixer": "^5.2.0",
"browserify": "^12.0.1",
"bower": "^1.4.1",
"mocha" :"^2.0.0",
"wd": "latest",
Expand All @@ -16,11 +19,14 @@
"minimist": "latest"
},
"config": {
"css_nb_dir": "urth_dash_js/notebook/dashboard-view",
"css_th_dir": "urth/dashboard/converter/static/urth"
"js_out": "urth_dash_js/notebook/dashboard-lib/jupyter-js-output-area",
"js_serv": "urth_dash_js/notebook/dashboard-lib/jupyter-js-services"
},
"scripts": {
"bower": "bower --allow-root install",
"build": "npm run bower && npm run build-jupyter-js-output-area && npm run build-jupyter-js-services",
"build-jupyter-js-output-area": "mkdir -p $npm_package_config_js_out && cp -r node_modules/jupyter-js-output-area/dist/* $npm_package_config_js_out",
"build-jupyter-js-services": "mkdir -p $npm_package_config_js_serv && browserify node_modules/jupyter-js-services/lib/index.js --outfile $npm_package_config_js_serv/jupyter-js-services.js --standalone JupyterJsServices",
"system-test": "node_modules/mocha/bin/mocha system-test/**/*-test.js --timeout 300000 --reporter spec"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions postcss-config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"use": ["autoprefixer"],
"autoprefixer": {
"browsers": "last 2 versions"
}
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run(self):

print('Installing Python server extension')
install.run(self)

print('Installing notebook JS extension')
install_nbextension(EXT_DIR, overwrite=True, user=True)

Expand All @@ -59,14 +59,14 @@ def run(self):
* Ability to nbconvert a notebook to a separate dashboard web application

See `the project README <https://github.com/jupyter-incubator/dashboards>`_
for more information.
for more information.
''',
url='https://github.com/jupyter-incubator/dashboards',
version=VERSION_NS['__version__'],
license='BSD',
platforms=['Jupyter Notebook 4.0.x'],
packages=[
'urth',
'urth',
'urth.dashboard'
],
include_package_data=True,
Expand All @@ -85,4 +85,4 @@ def run(self):
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
]
)
)
4 changes: 2 additions & 2 deletions urth/dashboard/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.

version_info = (0, 3, 0, 'dev')
__version__ = '.'.join(map(str, version_info))
version_info = (0, 4, 0, 'dev')
__version__ = '.'.join(map(str, version_info))
43 changes: 0 additions & 43 deletions urth_dash_js/notebook/dashboard-common/error-log.js

This file was deleted.

4 changes: 0 additions & 4 deletions urth_dash_js/notebook/dashboard-view/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ define([
'jquery',
'lodash',
'base/js/namespace',
'urth-common/error-log',
'../link-css',
'urth-common/gridstack-custom' // jquery plugin: return value not used
], function(
$,
_,
IPython,
ErrorLog,
linkCSS
) {
'use strict';
Expand All @@ -53,8 +51,6 @@ define([
this.opts = opts;
this._loaded = $.Deferred();

ErrorLog.enable(IPython);

var gridCssLoaded = cssLoaded;
if (!cssLoaded) {
gridCssLoaded = linkCSS('./bower_components/gridstack/dist/gridstack.css');
Expand Down