deephaven.ui Plugin
Plugin prototype for programmatic layouts and callbacks. Currently calling it deephaven.ui
but that's not set in stone.
Build
To create your build / development environment (skip the first two lines if you already have a venv):
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools
pip install build deephaven-plugin plotly
To build:
python -m build --wheel
The wheel is stored in dist/
.
To test within deephaven-core, note where this wheel is stored (using pwd
, for example).
Then, follow the directions in the top-level README.md to install the wheel into your Deephaven environment.
To unit test, run the following command from the root of the repo:
tox -e py
Usage
Once you have the JS and python plugins installed and the server started, you can use deephaven.ui. See examples for examples.
Logging
The Python library uses the logging module to log messages. The default log level is WARNING
. To change the log level for debugging, set the log level to DEBUG
:
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.WARNING)
logging.getLogger("deephaven.ui").setLevel(level=logging.DEBUG)
You can also set the log level for specific modules if you want to see specific modules' debug messages or filter out other ones, e.g.
logging.getLogger("deephaven.ui.hooks").setLevel(level=logging.WARNING)
logging.getLogger("deephaven.ui.render").setLevel(level=logging.DEBUG)
Docs
Docs can be built locally
Install the necessary dependencies:
pip install -r ../../sphinx_ext/sphinx-requirements.txt
pip install dist/deephaven_plugin_ui-*.whl
then run the docs make script:
python make_docs.py
The files will be built into docs/build/markdown
.
Note that these built files should not be committed to the repository.
Update Icon Types
Available IconTypes can be generated automatically using icon TypeScript definitions in node_modules.
Writes to icon_types.py
.
npm install
cd plugins/ui
python make_icon_types.py