Skip to content

feat(plugins): menu entries, selection gating and instruments for tools - #384

Merged
PierreRaybaut merged 3 commits into
feat/plugin-sdk-implementationfrom
feat/plugin-tools
Oct 7, 2026
Merged

PierreRaybaut merged 3 commits into
feat/plugin-sdk-implementationfrom
feat/plugin-tools

Conversation

@PierreRaybaut

@PierreRaybaut PierreRaybaut commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #374 (#383 is merged).

Application plugins can now offer tools that DataLab shows in its menus, and instruments with a live view, without writing any user interface code:

  • PluginTool gains object_type and selection (ToolSelection: none, exactly one, at least one, at least two). DataLab lists each tool in the plugin's submenu of the Plugins menu of its panel. When the selection does not match, it disables the menu entry and the catalog button, and the button tooltip tells what to select (PluginBase.assess_tool).
  • A tool may name an instrument method instead of a launcher. This method returns a PluginInstrument (new datalab.plugin_instruments module, Qt-free and shared with DataLab-Web): guidata settings, preview() returning an InstrumentFrame, and acquire() returning an InstrumentAcquisition.
  • New non-modal InstrumentWindow: PlotPy live view and summary on the left, embedded settings on the right (DataSetEditLayout with active states, groups, tabs and automatic sliders), and Live and Acquire buttons. Acquired objects go to a new group of the matching panel and are selected, ready for the application's methods. There is one window per tool; reloading plugins closes them.

The Camera and Pulse plugins use this to provide a scientific camera simulator and an oscilloscope simulator (DataLab-Platform/datalab-camera-characterization and DataLab-Platform/datalab-pulse-characterization, feat/equipment-simulator). The small windows that flashed while an instrument window opened came from guidata's automatic sliders; this is fixed on guidata develop (PlotPyStack/guidata@49cd14f).

Tests

  • Backbone, plugin and welcome tests: 235 passed. The 3 failures of plugin_generator_unit_test.py are environmental (sigimax missing in a subprocess). New tests cover tool validation, selection counting, instruments, the catalog tool buttons, and an application test for the menus of each panel, enable states, launch, the instrument window, errors, acquisition and reload.
  • Dialogs using automatic sliders (processing parameters and preview, replace special values, tools): 36 passed with the guidata fix.

Docs: the "Plugin tools" section is rewritten with a new "Instruments" subsection, plugin_tools and plugin_instruments join the public API, and the 1.4 release notes are updated, with their French catalogs; datalab.po updated. The Sphinx gettext build passes with -W.

Assisted-by: Claude Opus 5.5

@PierreRaybaut
PierreRaybaut changed the base branch from feat/application-metadata-guidance to feat/plugin-sdk-implementation October 7, 2026 18:23
@PierreRaybaut
PierreRaybaut merged commit c4e8494 into feat/plugin-sdk-implementation Oct 7, 2026
@PierreRaybaut
PierreRaybaut deleted the feat/plugin-tools branch October 7, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant