Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Package matplotlib and ui JS with wheel #343

Merged
merged 18 commits into from
Mar 14, 2024

Conversation

jnumainville
Copy link
Collaborator

@jnumainville jnumainville commented Mar 6, 2024

Fixes #194, fixes #316

Packages matplotlib and ui JS with wheel using new util packages. I also took the opportunity to refactor those two a bit to match the plotly express package by moving registration out of the __init__.py files. Also refactored plotly express.

I've verified the installed wheels work properly with basic examples.

By the way @devinrsmith I invited deephaven as an owner of the newly uploaded packages
https://pypi.org/project/deephaven-plugin-utilities/
https://pypi.org/project/deephaven-plugin-packaging/

@jnumainville jnumainville requested a review from mofojed March 6, 2024 21:31
plugins/plotly-express/setup.py Show resolved Hide resolved
plugins/ui/src/deephaven/ui/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to update the Dockerfile configs now that you're registering the plugin with python.

Try running npm run docker to verify it works/starts up correctly. Right now it's throwing this error:

deephaven-plugins-deephaven-plugins-1  | Initiating shutdown due to: Uncaught exception in thread main
deephaven-plugins-deephaven-plugins-1  | java.lang.RuntimeException: Error in Python interpreter:
deephaven-plugins-deephaven-plugins-1  | Type: <class 'RuntimeError'>
deephaven-plugins-deephaven-plugins-1  | Value: Failed to register @deephaven/[email protected] embedded in Python plugin: java.lang.IllegalArgumentException: js plugin with name '@deephaven/js-plugin-ui' already exists. See https://github.com/deephaven/deephaven-core/issues/3048
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.jetty.JsPluginsZipFilesystem.checkExisting(JsPluginsZipFilesystem.java:82)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.jetty.JsPluginsZipFilesystem.add(JsPluginsZipFilesystem.java:61)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.jetty.JsPlugins.register(JsPlugins.java:38)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistrationVisitor.visit(PluginRegistrationVisitor.java:46)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistrationVisitor.visit(PluginRegistrationVisitor.java:19)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.plugin.js.JsPlugin.walk(JsPlugin.java:105)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistrationVisitor.register(PluginRegistrationVisitor.java:35)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistration$Counting.visit(PluginRegistration.java:70)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistration$Counting.visit(PluginRegistration.java:46)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.plugin.js.JsPlugin.walk(JsPlugin.java:105)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistration$Counting.register(PluginRegistration.java:53)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.python.CallbackAdapter.registerJsPlugin(CallbackAdapter.java:25)
deephaven-plugins-deephaven-plugins-1  |        at org.jpy.PyLib.callAndReturnValue(Native Method)
deephaven-plugins-deephaven-plugins-1  |        at org.jpy.PyProxyHandler.invoke(PyProxyHandler.java:120)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.python.$Proxy16.initialize_all_and_register_into(Unknown Source)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.python.PythonPluginsRegistration.registerInto(PythonPluginsRegistration.java:33)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistration.registerAll(PluginRegistration.java:41)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.runner.DeephavenApiServer.run(DeephavenApiServer.java:150)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.jetty.JettyMain.main(JettyMain.java:24)
deephaven-plugins-deephaven-plugins-1  | 
deephaven-plugins-deephaven-plugins-1  | Line: 57
deephaven-plugins-deephaven-plugins-1  | Namespace: _register_js
deephaven-plugins-deephaven-plugins-1  | File: /opt/deephaven/venv/lib/python3.10/site-packages/deephaven/plugin/utilities/dhe_safe_callback_wrapper.py
deephaven-plugins-deephaven-plugins-1  | Traceback (most recent call last):
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven_internal/plugin/__init__.py", line 18, in initialize_all_and_register_into
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven_internal/plugin/register.py", line 20, in initialize_all_and_register_into
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/plugin/__init__.py", line 95, in register_all_into
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/ui/_register.py", line 27, in register_into
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/plugin/utilities/dhe_safe_callback_wrapper.py", line 35, in register
deephaven-plugins-deephaven-plugins-1  |   File "/opt/deephaven/venv/lib/python3.10/site-packages/deephaven/plugin/utilities/dhe_safe_callback_wrapper.py", line 57, in _register_js
deephaven-plugins-deephaven-plugins-1  | 
deephaven-plugins-deephaven-plugins-1  |        at org.jpy.PyLib.callAndReturnValue(Native Method)
deephaven-plugins-deephaven-plugins-1  |        at org.jpy.PyProxyHandler.invoke(PyProxyHandler.java:120)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.python.$Proxy16.initialize_all_and_register_into(Unknown Source)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.python.PythonPluginsRegistration.registerInto(PythonPluginsRegistration.java:33)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.plugin.PluginRegistration.registerAll(PluginRegistration.java:41)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.runner.DeephavenApiServer.run(DeephavenApiServer.java:150)
deephaven-plugins-deephaven-plugins-1  |        at io.deephaven.server.jetty.JettyMain.main(JettyMain.java:24)

@jnumainville jnumainville requested a review from mofojed March 7, 2024 20:03
@jnumainville jnumainville self-assigned this Mar 11, 2024
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change, looks good otherwise

docker/config/deephaven.prop Outdated Show resolved Hide resolved
@jnumainville jnumainville requested a review from mofojed March 13, 2024 19:16
@jnumainville jnumainville merged commit 7724e55 into deephaven:main Mar 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove DEEPHAVEN_ENABLE_PY_JS Package JS with python for plugins
2 participants