diff --git a/.coveragerc_omit b/.coveragerc_omit index 0a180d2..6ccb3ae 100644 --- a/.coveragerc_omit +++ b/.coveragerc_omit @@ -11,4 +11,5 @@ omit = vitessce/data_utils/ome.py vitessce/data_utils/entities.py vitessce/data_utils/multivec.py - vitessce/widget_plugins/demo_plugin.py \ No newline at end of file + vitessce/widget_plugins/demo_plugin.py + vitessce/widget_plugins/spatial_query_plugin.py \ No newline at end of file diff --git a/docs/widget_plugins.rst b/docs/widget_plugins.rst index cfe1d32..a1c7f92 100644 --- a/docs/widget_plugins.rst +++ b/docs/widget_plugins.rst @@ -47,24 +47,21 @@ If defined, these plugin arrays are passed to the Vitessce component as `props < Passing plugin ESM to the widget -------------------------------- -The plugin string can be passed to the widget using the ``plugin_esm`` parameter: +The plugin string can be passed to the widget using the ``plugins`` parameter and passing a subclass of ``VitesscePlugin``: .. code-block:: python - from vitessce import VitessceConfig + from vitessce import VitessceConfig, VitesscePlugin - vc = VitessceConfig( - description="A Vitessce widget with a custom plugin", - widget=[ - { - "plugin": PLUGIN_ESM, - }, - ], - ) + class MyPlugin(VitesscePlugin): + plugin_esm = PLUGIN_ESM + + vc = VitessceConfig(description="A Vitessce widget with a custom plugin") # Some more configuration here... - vc.widget(plugin_esm=PLUGIN_ESM) + plugin = MyPlugin() + vc.widget(plugins=[plugin]) ------------------------------- @@ -149,4 +146,7 @@ vitessce.widget_plugins *********************** .. automodule:: vitessce.widget_plugins.demo_plugin + :members: + +.. automodule:: vitessce.widget_plugins.spatial_query :members: \ No newline at end of file