From 704828cc3582aad2a096d232f513aa7317c66ad0 Mon Sep 17 00:00:00 2001 From: alice grosch <a.grosch@fz-juelich.de> Date: Fri, 20 Dec 2019 16:09:18 +0100 Subject: [PATCH] Fix imjs imports --- MANIFEST | 48 +++++++++++++++++++++++++++++++++++++ css/widget.css | 4 +--- examples/introduction.ipynb | 42 +++++++++++++++++++++++++++++++- package-lock.json | 2 +- package.json | 2 +- pvlink/_version.py | 2 +- setup.py | 27 +++++++++++---------- src/widget.ts | 8 +++---- 8 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 MANIFEST diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..5129885 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,48 @@ +# file GENERATED by distutils, do NOT edit +LICENSE.txt +README.md +package.json +pvlink.json +pytest.ini +setup.cfg +setup.py +setupbase.py +tsconfig.json +webpack.config.js +docs/Makefile +docs/environment.yml +docs/make.bat +docs/source/conf.py +docs/source/develop-install.rst +docs/source/index.rst +docs/source/installing.rst +docs/source/introduction.rst +docs/source/_static/embed-bundle.js +docs/source/_static/embed-bundle.js.map +docs/source/_static/helper.js +docs/source/examples/index.rst +docs/source/examples/introduction.nblink +examples/introduction.ipynb +examples/.ipynb_checkpoints/introduction-checkpoint.ipynb +pvlink/__init__.py +pvlink/_frontend.py +pvlink/_version.py +pvlink/remoterenderer.py +pvlink/labextension/pvlink-0.1.7.tgz +pvlink/nbextension/__init__.py +pvlink/nbextension/static/extension.js +pvlink/nbextension/static/index.js +pvlink/nbextension/static/index.js.map +pvlink/tests/__init__.py +pvlink/tests/conftest.py +pvlink/tests/test_example.py +pvlink/tests/test_nbextension_path.py +src/extension.ts +src/index.ts +src/plugin.ts +src/version.ts +src/widget.ts +tests/karma.conf.js +tests/tsconfig.json +tests/src/index.spec.ts +tests/src/utils.spec.ts diff --git a/css/widget.css b/css/widget.css index d35a8cf..8b13789 100644 --- a/css/widget.css +++ b/css/widget.css @@ -1,3 +1 @@ -.custom-widget { - min-height: 300px; -} + diff --git a/examples/introduction.ipynb b/examples/introduction.ipynb index a5ce9ac..6884d10 100644 --- a/examples/introduction.ipynb +++ b/examples/introduction.ipynb @@ -43,7 +43,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "ba8637b51e554b23a06c0a4df51b4eca", + "model_id": "0c83cf6a85944beeb8e0e62d3576c8ab", "version_major": 2, "version_minor": 0 }, @@ -59,6 +59,46 @@ "display(w)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Widgets scales with container size" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "from ipywidgets import Box" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "bc30c04151414d61aa52c616506580c4", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "Box(children=(RemoteRenderer(),), layout=Layout(height='500px'))" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "Box(children=[w], layout={'height':'500px'})" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/package-lock.json b/package-lock.json index 9ca84d8..e7c47c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pvlink", - "version": "0.1.0", + "version": "0.1.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5115060..9ee8280 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pvlink", - "version": "0.1.0", + "version": "0.1.1", "description": "ParaView-Web RemoteRenderer in Jupyter", "keywords": [ "jupyter", diff --git a/pvlink/_version.py b/pvlink/_version.py index fdb1be3..8ae846d 100644 --- a/pvlink/_version.py +++ b/pvlink/_version.py @@ -4,5 +4,5 @@ # Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. -version_info = (0, 1, 0, 'dev') +version_info = (0, 1, 1, 'dev') __version__ = ".".join(map(str, version_info)) diff --git a/setup.py b/setup.py index c1e6cdf..e9c822f 100644 --- a/setup.py +++ b/setup.py @@ -60,19 +60,20 @@ cmdclass['jsdeps'] = combine_commands( setup_args = dict( - name = name, - description = 'ParaView-Web RemoteRenderer in Jupyter', - version = version, - scripts = glob(pjoin('scripts', '*')), - cmdclass = cmdclass, - packages = find_packages(), - author = 'Juelich Supercomputing Centre (JSC)', - author_email = 'a.grosch@fz-juelich.de', - url = 'https://github.com//pvlink', - license = 'BSD', - platforms = "Linux, Mac OS X, Windows", - keywords = ['Jupyter', 'Widgets', 'IPython'], - classifiers = [ + name = name, + description = 'ParaView-Web RemoteRenderer in Jupyter', + long_description = 'ParaView-Web RemoteRenderer in Jupyter', + version = version, + scripts = glob(pjoin('scripts', '*')), + cmdclass = cmdclass, + packages = find_packages(), + author = 'Juelich Supercomputing Centre (JSC)', + author_email = 'a.grosch@fz-juelich.de', + url = 'https://gitlab.version.fz-juelich.de/jupyter4jsc/j4j_extras/pvlink', + license = 'BSD', + platforms = "Linux, Mac OS X, Windows", + keywords = ['Jupyter', 'Widgets', 'IPython'], + classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', diff --git a/src/widget.ts b/src/widget.ts index 1061eb3..30ddd1b 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -12,10 +12,10 @@ import { // Import the CSS import '../css/widget.css' -import { ParaViewWebClient } from 'paraviewweb/src/IO/WebSocket/ParaViewWebClient'; -import { RemoteRenderer } from 'paraviewweb/src/NativeUI/Canvas/RemoteRenderer'; -import { SizeHelper } from "paraviewweb/src/Common/Misc/SizeHelper"; -import { SmartConnect } from 'wslink/src/SmartConnect'; +import SmartConnect from 'wslink/src/SmartConnect'; +import RemoteRenderer from 'paraviewweb/src/NativeUI/Canvas/RemoteRenderer'; +import SizeHelper from 'paraviewweb/src/Common/Misc/SizeHelper'; +import ParaViewWebClient from 'paraviewweb/src/IO/WebSocket/ParaViewWebClient'; export -- GitLab