Skip to content

Commit 3d795e3

Browse files
committed
docs(plugins): state which functions processing plugins may register (#415)
A Sigima computation function, or, for a 1-to-1 feature without parameters, a NumPy function wrapped with `Wrap1to1Func`, as in the processing plugin example. With its French translation. Assisted-by: Claude Opus 5.5
1 parent 5cf064e commit 3d795e3

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎doc/features/advanced/plugins.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ image panels exist. Owned features are removed automatically when the plugin is
305305
disabled, reloaded, or uninstalled. ``create_actions()`` may then reference the
306306
registered feature by its stable ID.
307307

308+
A registered feature runs a Sigima computation function, decorated with :func:`sigima.proc.decorator.computation_function`. For a 1-to-1 feature without parameters, the simplest is to wrap a function processing NumPy arrays with :class:`sigima.proc.signal.Wrap1to1Func` (signal Y values) or :class:`sigima.proc.image.Wrap1to1Func` (image data), as in the processing plugin example (see :ref:`plugin_example_processing`). DataLab refuses other functions when they are registered.
309+
308310
Headless recipes
309311
----------------
310312

@@ -721,6 +723,8 @@ To develop in your usual Python environment (e.g., with an IDE like `Spyder <htt
721723

722724
Even if you’ve installed `datalab` in your environment, you cannot run the full DataLab application directly from an IDE. You must launch DataLab via the command line or using the installer-created shortcut to properly test your plugin.
723725

726+
.. _plugin_example_processing:
727+
724728
Example: processing plugin
725729
--------------------------
726730

‎doc/locale/fr/LC_MESSAGES/features/advanced/plugins.po‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ msgstr "Ces aides simplifient le code des plugins et le maintiennent cohérent a
295295
msgid "Processing plugins should override ``register_computations()`` and register each feature with a stable ``feature_id`` of the form ``<plugin_id>:<local_id>`` and ``owner_plugin_id=self.plugin_id``. DataLab calls this hook after the signal and image panels exist. Owned features are removed automatically when the plugin is disabled, reloaded, or uninstalled. ``create_actions()`` may then reference the registered feature by its stable ID."
296296
msgstr "Les plugins de traitement doivent surcharger ``register_computations()`` et enregistrer chaque fonctionnalité avec un ``feature_id`` stable de la forme ``<plugin_id>:<local_id>`` et ``owner_plugin_id=self.plugin_id``. DataLab appelle cette méthode une fois les panneaux Signal et Image créés. Les fonctionnalités détenues par le plugin sont supprimées automatiquement lorsque celui-ci est désactivé, rechargé ou désinstallé. ``create_actions()`` peut ensuite faire référence à la fonctionnalité enregistrée par son identifiant stable."
297297

298+
msgid "A registered feature runs a Sigima computation function, decorated with :func:`sigima.proc.decorator.computation_function`. For a 1-to-1 feature without parameters, the simplest is to wrap a function processing NumPy arrays with :class:`sigima.proc.signal.Wrap1to1Func` (signal Y values) or :class:`sigima.proc.image.Wrap1to1Func` (image data), as in the processing plugin example (see :ref:`plugin_example_processing`). DataLab refuses other functions when they are registered."
299+
msgstr "Une fonctionnalité enregistrée exécute une fonction de calcul Sigima, décorée par :func:`sigima.proc.decorator.computation_function`. Pour une fonctionnalité 1 vers 1 sans paramètre, le plus simple est d'envelopper une fonction traitant des tableaux NumPy avec :class:`sigima.proc.signal.Wrap1to1Func` (valeurs Y d'un signal) ou :class:`sigima.proc.image.Wrap1to1Func` (données d'une image), comme dans l'exemple de plugin de traitement (voir :ref:`plugin_example_processing`). DataLab refuse les autres fonctions dès leur enregistrement."
300+
298301
msgid "Headless recipes"
299302
msgstr "Recettes sans interface graphique"
300303

0 commit comments

Comments
 (0)