diff --git a/.gitignore b/.gitignore index 435edce79dcea3c85484091f231c7668f677b6c5..88d7561b4f9cbe930034729397f58a9c2c6ca588 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,157 @@ -# Ipython Notebook -.ipynb_checkpoints/ - # Byte-compiled / optimized / DLL files -pvlink/__pycache__/ +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so -# Distibution / packaging +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py + +# Flask instance folder +instance/ + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/ +docs/_build/ +docs/source/_static/embed-bundle.js +docs/source/_static/embed-bundle.js.map + +# PyBuilder +target/ + +# IPython Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# dotenv +.env + +# virtualenv +venv/ +ENV/ + +# Spyder project settings +.spyderproject + +# Rope project settings +.ropeproject + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + # NPM -node_modules/ -static/ -yarn.lock +# ---- + +**/node_modules/ +pvlink/nbextension/static/index.* +pvlink/labextension/*.tgz + +# Coverage data +# ------------- +**/coverage/ + +# Packed lab extensions +pvlink/labextension diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000000000000000000000000000000000000..f8ec1d1968b229acc328340b8cd336c5175111ee --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +.DS_Store +node_modules/ +tests/ +.jshintrc +# Ignore any build output from python: +dist/*.tar.gz +dist/*.wheel diff --git a/LICENSE.txt b/LICENSE.txt index 99c418a74ea06fb099956389090d2afcb157869b..98c33569079213fc77af8a3ca3290f9e817c5f23 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,8 @@ -Copyright (c) 2019 Alice Grosch +Copyright (c) 2019 Juelich Supercomputing Centre (JSC) All rights reserved. + Alice Grosch <a.grosch@fz-juelich.de> + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index d2ab2b1ba14b9f3bdd58a7a875ce90402a1e8739..afc7b2033e346753222b01bd67608a759026fd11 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ ParaView-Web RemoteRenderer in Jupyter - ## Installation You can install using `pip`: diff --git a/docs/source/conf.py b/docs/source/conf.py index 165e9269b11f8a133d35e26ccf39df000c4f0d8d..7291d8de0b76690f2c07eb4235cc1356e77e74b5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -55,8 +55,8 @@ master_doc = 'index' # General information about the project. project = 'pvlink' -copyright = '2019, Alice Grosch' -author = 'Alice Grosch' +copyright = '2019, Juelich Supercomputing Centre (JSC)' +author = 'Juelich Supercomputing Centre (JSC)' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -144,7 +144,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'pvlink.tex', 'pvlink Documentation', - 'Alice Grosch', 'manual'), + 'Juelich Supercomputing Centre (JSC)', 'manual'), ] @@ -171,7 +171,7 @@ texinfo_documents = [ 'pvlink Documentation', author, 'pvlink', - 'A Custom Jupyter Widget Library', + 'ParaView-Web RemoteRenderer in Jupyter', 'Miscellaneous'), ] diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index e18966a060575658fda2b25849b66ece9fca503d..ad0edd44f2396d7e34696000ad052789ef187536 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -2,17 +2,6 @@ Introduction ============= -Create a ParaView-Web RemoteRenderer Widget in the output area below a cell in a Jupyter Notebook. This requires a VTK-Web or ParaView-Web server, see https://kitware.github.io/paraviewweb/examples/RemoteRenderer.html#RemoteRenderer. +.. todo:: -Example -------- - -Start a ParaView-Web server with - - $ pvpython pv_server.py --port 8080 --authKey wslink-secret - -In the notebook, display the RemoteRenderer Widget with - - display(pvlink.RemoteRenderer( - sessionURL='ws://localhost:8080/ws', - authKey='wslink-secret')) + add prose explaining project purpose and usage here diff --git a/examples/introduction.ipynb b/examples/introduction.ipynb index 56e3e2b9f43a8d19301354b6148ff31e4afe0917..a5ce9ac1ac560a25012016a41cc254df013e89bf 100644 --- a/examples/introduction.ipynb +++ b/examples/introduction.ipynb @@ -26,6 +26,15 @@ "```" ] }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "w = pvlink.RemoteRenderer(sessionURL='ws://localhost:8080/ws', authKey='wslink-secret')" + ] + }, { "cell_type": "code", "execution_count": 3, @@ -34,7 +43,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "2741791ce33e4817b8c46f60d47b081c", + "model_id": "ba8637b51e554b23a06c0a4df51b4eca", "version_major": 2, "version_minor": 0 }, @@ -47,9 +56,15 @@ } ], "source": [ - "w = pvlink.RemoteRenderer(sessionURL='ws://localhost:8080/ws', authKey='wslink-secret')\n", - "w" + "display(w)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -73,4 +88,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/package.json b/package.json index f6cd82d44562a31d206f4dd9300b752f6734948c..51150608cc936b9121d6531bc57cd822fc17b50c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pvlink", "version": "0.1.0", - "description": "ParaViewWeb RemoteRenderer in Jupyter", + "description": "ParaView-Web RemoteRenderer in Jupyter", "keywords": [ "jupyter", "jupyterlab", @@ -13,9 +13,9 @@ "dist/*.js", "css/*.css" ], - "homepage": "https://github.com//pvlink", + "homepage": "https://gitlab.version.fz-juelich.de/jupyter4jsc/j4j_extras/pvlink", "bugs": { - "url": "https://github.com//pvlink/issues" + "url": "https://gitlab.version.fz-juelich.de/jupyter4jsc/j4j_extras/pvlink/issues" }, "license": "BSD-3-Clause", "author": { @@ -26,7 +26,7 @@ "types": "./lib/index.d.ts", "repository": { "type": "git", - "url": "https://github.com//pvlink" + "url": "https://gitlab.version.fz-juelich.de/jupyter4jsc/j4j_extras/pvlink" }, "scripts": { "build": "npm run build:lib && npm run build:nbextension", diff --git a/pvlink/__init__.py b/pvlink/__init__.py index c5169919aabb68b8580bd10e50167fe6ef99bccc..20ffb82e260bbd356a343820cc074ba9920a37f6 100644 --- a/pvlink/__init__.py +++ b/pvlink/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. from .remoterenderer import RemoteRenderer diff --git a/pvlink/_frontend.py b/pvlink/_frontend.py index b7a1d21796b9f015d2e7077d12fcd90f1c7a3533..8e391d010f2c375b86e10aaa135842deb8b58e5a 100644 --- a/pvlink/_frontend.py +++ b/pvlink/_frontend.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. """ diff --git a/pvlink/_version.py b/pvlink/_version.py index bce0f989554364fecfe8c69ade8095e0306f119b..fdb1be357a757978d8a6036dbfe2dc914f5e5d40 100644 --- a/pvlink/_version.py +++ b/pvlink/_version.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. version_info = (0, 1, 0, 'dev') diff --git a/pvlink/nbextension/__init__.py b/pvlink/nbextension/__init__.py index bb075957bbc418853ac079d2a501766aa967fc24..99b0616564fe25e3646a90884b64e9d10e514bca 100644 --- a/pvlink/nbextension/__init__.py +++ b/pvlink/nbextension/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch +# Copyright (c) Juelich Supercomputing Centre (JSC) # Distributed under the terms of the Modified BSD License. def _jupyter_nbextension_paths(): diff --git a/pvlink/nbextension/static/extension.js b/pvlink/nbextension/static/extension.js new file mode 100644 index 0000000000000000000000000000000000000000..cfed50116f3dabaad4a73a9b4e864822da95bda5 --- /dev/null +++ b/pvlink/nbextension/static/extension.js @@ -0,0 +1,17 @@ +// Entry point for the notebook bundle containing custom model definitions. +// +define(function() { + "use strict"; + + window['requirejs'].config({ + map: { + '*': { + 'pvlink': 'nbextensions/pvlink/index', + }, + } + }); + // Export the required load_ipython_extension function + return { + load_ipython_extension : function() {} + }; +}); diff --git a/pvlink/remoterenderer.py b/pvlink/remoterenderer.py index aaa79d640a26e9694b23c5fc05e8b5d2959f4d9f..a3912ff911dca8ce57a68e53b8ed15d2f4a656a9 100644 --- a/pvlink/remoterenderer.py +++ b/pvlink/remoterenderer.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. """ @@ -58,4 +58,4 @@ class RemoteRenderer(DOMWidget): def update_render(self): """Explicit call for the renderer on the javascript side to render.""" - self._update += 1 + self._update += 1 \ No newline at end of file diff --git a/pvlink/tests/conftest.py b/pvlink/tests/conftest.py index 20a88fb1eeaae59526ed78035c1c08ca41aace60..f4ecae680762509d8c56db66878127e22a0fa505 100644 --- a/pvlink/tests/conftest.py +++ b/pvlink/tests/conftest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. import pytest diff --git a/pvlink/tests/test_example.py b/pvlink/tests/test_example.py index 76d62230bcf2dd2816efaf5963f078a6821a7899..7e97b0fb164f6b40955addf70627fbdf3c39fbad 100644 --- a/pvlink/tests/test_example.py +++ b/pvlink/tests/test_example.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. import pytest diff --git a/pvlink/tests/test_nbextension_path.py b/pvlink/tests/test_nbextension_path.py index f88e4d5e0950e1591a58bf4a76a0aa9eafd44705..8a85ddac7aba2ef86dfb5dd585ee95d5e62158f6 100644 --- a/pvlink/tests/test_nbextension_path.py +++ b/pvlink/tests/test_nbextension_path.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # coding: utf-8 -# Copyright (c) Alice Grosch. +# Copyright (c) Juelich Supercomputing Centre (JSC). # Distributed under the terms of the Modified BSD License. diff --git a/setup.py b/setup.py index f87ce679ae1bf908f1e6ecf8d0b9f28393495573..c1e6cdfd1108d7f32c99df5eef489b2b6b3e5d40 100644 --- a/setup.py +++ b/setup.py @@ -61,12 +61,12 @@ cmdclass['jsdeps'] = combine_commands( setup_args = dict( name = name, - description = 'A Custom Jupyter Widget Library', + description = 'ParaView-Web RemoteRenderer in Jupyter', version = version, scripts = glob(pjoin('scripts', '*')), cmdclass = cmdclass, packages = find_packages(), - author = 'Alice Grosch', + author = 'Juelich Supercomputing Centre (JSC)', author_email = 'a.grosch@fz-juelich.de', url = 'https://github.com//pvlink', license = 'BSD', diff --git a/src/index.ts b/src/index.ts index 54535d2cdd7cddb820acaf036512b136569e513c..346c3eda5f07ab03180345dc474a89a162811cdd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -// Copyright (c) Alice Grosch +// Copyright (c) Juelich Supercomputing Centre (JSC) // Distributed under the terms of the Modified BSD License. export * from './version'; diff --git a/src/plugin.ts b/src/plugin.ts index aa0ada0bfb49aae7b3d6fa01b354cfb1aeedafab..20b92cdaf66ed5e697edad604624b50f9b3a2613 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,4 @@ -// Copyright (c) Alice Grosch +// Copyright (c) Juelich Supercomputing Centre (JSC) // Distributed under the terms of the Modified BSD License. import { diff --git a/src/version.ts b/src/version.ts index d8fc73bb899053f46f735119db8a7c3f4b6e38fa..dd14cc6def1bc766516557fc3a7c10800c6d3e54 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,4 +1,4 @@ -// Copyright (c) Alice Grosch +// Copyright (c) Juelich Supercomputing Centre (JSC) // Distributed under the terms of the Modified BSD License. const data = require('../package.json'); diff --git a/src/widget.ts b/src/widget.ts index ca121de46266e004f2a7e090aa020c1a01d1b644..1061eb3bcea5ed33754bb909d4c2fbec21d5cbe3 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -1,4 +1,4 @@ -// Copyright (c) Alice Grosch +// Copyright (c) Juelich Supercomputing Centre (JSC) // Distributed under the terms of the Modified BSD License. import { diff --git a/tests/src/index.spec.ts b/tests/src/index.spec.ts index b3325188351dbf65231c83a23596465e052b1bc4..d4dcb4cc3f128e63635336a6efda5a94c7343a2e 100644 --- a/tests/src/index.spec.ts +++ b/tests/src/index.spec.ts @@ -35,4 +35,4 @@ describe('RemoteRenderer', () => { }); -}); +}); \ No newline at end of file