This repository will quickly get you started creating your own webviz-config
plugins 🚀.
Creating a new Python package with webviz-config
plugins by pushing Use this template
-button.
Configure new python package in repository by the following steps
- Rename project
- Rename/Delete existing example plugins
The default package created for you contains some dummy plugins. These you can later delete/and or overwrite with your fancy plugins. You can have an arbitrary number of plugins in your package.
To install your plugin package in development mode, run
cd YOUR_PLUGIN_PROJECT
pip install -e .
This will (first time) install all dependencies, but the -e
flag will also make sure your plugin project is installed in edit/development mode. This means that when you update the Python files in your package, this will automatically be available in your current Python environment without having to reinstall the package.
After installation you can test the custom plugins from your package using the provided example configuration file:
webviz build ./examples/boilerplate_example.yaml
If you want to install test and linting dependencies, you can in addition run
pip install .[tests]
You can do automatic linting of your code changes by running
black --check webviz_plugin_boilerplate # Check code style
pylint webviz_plugin_boilerplate # Check code quality
bandit -r webviz_plugin_boilerplate # Check Python security best practice
For general usage, see the documentation on webviz-config.
You are now ready to modify the package with your own plugins. Have fun! 🍰