[jupyter] update widget so it uses str(...) instread of repr(...) and topological order of nodes.
This commit is contained in:
21
bonobo/ext/jupyter/js/dist/index.js
vendored
21
bonobo/ext/jupyter/js/dist/index.js
vendored
@ -42,7 +42,7 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Entry point for the unpkg bundle containing custom model definitions.
|
||||
//
|
||||
@ -55,14 +55,13 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
module.exports['version'] = __webpack_require__(4).version;
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var widgets = __webpack_require__(2);
|
||||
var _ = __webpack_require__(3);
|
||||
|
||||
|
||||
// Custom Model. Custom widgets models must at least provide default values
|
||||
// for model attributes, including `_model_name`, `_view_name`, `_model_module`
|
||||
// and `_view_module` when different from the base class.
|
||||
@ -102,15 +101,15 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
};
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscore.js 1.8.3
|
||||
// http://underscorejs.org
|
||||
@ -1662,9 +1661,9 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
}.call(this));
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = {
|
||||
"name": "bonobo-jupyter",
|
||||
@ -1696,6 +1695,6 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
}
|
||||
};
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ])});;
|
||||
//# sourceMappingURL=index.js.map
|
||||
2
bonobo/ext/jupyter/js/dist/index.js.map
vendored
2
bonobo/ext/jupyter/js/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,7 +1,6 @@
|
||||
var widgets = require('jupyter-js-widgets');
|
||||
var _ = require('underscore');
|
||||
|
||||
|
||||
// Custom Model. Custom widgets models must at least provide default values
|
||||
// for model attributes, including `_model_name`, `_view_name`, `_model_module`
|
||||
// and `_view_module` when different from the base class.
|
||||
|
||||
1441
bonobo/ext/jupyter/js/yarn.lock
Normal file
1441
bonobo/ext/jupyter/js/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,8 @@ class JupyterOutputPlugin(Plugin):
|
||||
IPython.core.display.display(self.widget)
|
||||
|
||||
def run(self):
|
||||
self.widget.value = [repr(node) for node in self.context.parent.nodes]
|
||||
self.widget.value = [
|
||||
str(self.context.parent[i]) for i in self.context.parent.graph.topologically_sorted_indexes
|
||||
]
|
||||
|
||||
finalize = run
|
||||
|
||||
@ -42,7 +42,7 @@ define(function() { return /******/ (function(modules) { // webpackBootstrap
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// This file contains the javascript that is run when the notebook is loaded.
|
||||
// It contains some requirejs configuration and the `load_ipython_extension`
|
||||
@ -66,5 +66,5 @@ define(function() { return /******/ (function(modules) { // webpackBootstrap
|
||||
};
|
||||
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ])});;
|
||||
@ -42,7 +42,7 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Entry point for the notebook bundle containing custom model definitions.
|
||||
//
|
||||
@ -58,14 +58,13 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
module.exports['version'] = __webpack_require__(4).version;
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var widgets = __webpack_require__(2);
|
||||
var _ = __webpack_require__(3);
|
||||
|
||||
|
||||
// Custom Model. Custom widgets models must at least provide default values
|
||||
// for model attributes, including `_model_name`, `_view_name`, `_model_module`
|
||||
// and `_view_module` when different from the base class.
|
||||
@ -105,15 +104,15 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
};
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ function(module, exports, __webpack_require__) {
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscore.js 1.8.3
|
||||
// http://underscorejs.org
|
||||
@ -1665,9 +1664,9 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
}.call(this));
|
||||
|
||||
|
||||
/***/ },
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ function(module, exports) {
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = {
|
||||
"name": "bonobo-jupyter",
|
||||
@ -1699,6 +1698,6 @@ define(["jupyter-js-widgets"], function(__WEBPACK_EXTERNAL_MODULE_2__) { return
|
||||
}
|
||||
};
|
||||
|
||||
/***/ }
|
||||
/***/ })
|
||||
/******/ ])});;
|
||||
//# sourceMappingURL=index.js.map
|
||||
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@ import ipywidgets as widgets
|
||||
from traitlets import List, Unicode
|
||||
|
||||
|
||||
@widgets.register('bonobo-widget.Bonobo')
|
||||
@widgets.register('bonobo-widget.bonobo')
|
||||
class BonoboWidget(widgets.DOMWidget):
|
||||
_view_name = Unicode('BonoboView').tag(sync=True)
|
||||
_model_name = Unicode('BonoboModel').tag(sync=True)
|
||||
|
||||
Reference in New Issue
Block a user