Skip to content

v0.2.1

  • v0.2.1
  • ee39e19
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Choose a tag to compare

  • v0.2.1
  • ee39e19
  • Choose a tag to compare

  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@jnumainville jnumainville tagged this 16 Dec 21:12
Part of fix for #3

Added logic to check if the script is being ran in google colab, then replace the server url with proxied url for the specified port if that is the case
Tested in google colab, created a widget and verified that the iframe appeared
!apt-get install openjdk-11-jdk-headless

import os
from google.colab.output import eval_js
os.environ["JAVA_HOME"] = "/usr/lib/jvm/java-11-openjdk-amd64"

from google.colab import drive
drive.mount('/content/drive')

!pip install --upgrade pip setuptools wheel
!pip install deephaven-core deephaven-server
!pip install '/content/drive/MyDrive/deephaven_ipywidgets-0.2.0-py2.py3-none-any.whl'

import deephaven_server
from deephaven_server import Server
import portpicker
from google.colab.output import eval_js

dh_port = portpicker.pick_unused_port()
s = Server(port=dh_port, jvm_args=["-Xmx4g", "-Dhttp.requireHttp2=false"], dh_args={'http.requireHttp2': False})
s.start()

from google.colab import output
output.enable_custom_widget_manager()

from deephaven import empty_table
t = empty_table(10).update("x=i")

from deephaven_ipywidgets import DeephavenWidget
DeephavenWidget(t)
Assets 2
Loading