Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,18 @@ jobs:
# CPython 3.11 needs this Wine-built DLL to run on Windows 7.
Copy-Item resources/api-ms-win-core-path-l1-1-0.dll dist/DataLab/_internal/ -Force

- name: Check that the executable loads a plugin installed from a file
shell: pwsh
run: |
# Isolated profile: DataLab reads its configuration from USERPROFILE
$env:USERPROFILE = Join-Path $env:RUNNER_TEMP "datalab-profile"
New-Item -ItemType Directory -Force $env:USERPROFILE | Out-Null
$env:DATALAB_PLUGIN_PROBE_MARKER = Join-Path $env:RUNNER_TEMP "plugin-probe.json"
python scripts/frozen_plugin_probe.py install
$process = Start-Process dist/DataLab/DataLab.exe -ArgumentList "--unattended", "--delay", "5000" -PassThru
if (-not $process.WaitForExit(300000)) { $process.Kill(); throw "DataLab did not quit" }
python scripts/frozen_plugin_probe.py verify

- name: Package executable as zip (internal, required by MSI workflow)
shell: pwsh
run: |
Expand Down
2 changes: 2 additions & 0 deletions DataLab.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from PyInstaller.utils.hooks import collect_submodules, collect_data_files, copy_metadata
all_hidden_imports = collect_submodules('datalab')
# Plugins installed from a file may import any Sigima module
all_hidden_imports += collect_submodules('sigima', filter=lambda name: '.tests' not in name)
datas = collect_data_files('datalab') + [('datalab\\plugins\\builtin', 'datalab\\plugins\\builtin')]
# Macro templates are read with ``pkgutil.get_data`` and must exist on disk,
# not only inside the PYZ archive (``collect_data_files`` skips ``.py`` files):
Expand Down
6 changes: 6 additions & 0 deletions datalab/gui/plugins/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
set_user_plugin_paths,
)
from datalab.gui.plugins.applications import get_plugin_icon
from datalab.gui.plugins.install import InstalledPluginsWidget
from datalab.plugins import (
PLUGINS_DEFAULT_PATH,
PluginCapability,
Expand Down Expand Up @@ -615,6 +616,9 @@ def __init__(self, parent: DLMainWindow):
self.reload_button: QW.QPushButton | None = None
self.global_toggle_button: QW.QPushButton | None = None
self.v020_warning_checkbox: QW.QCheckBox | None = None
self.installed_plugins_widget = InstalledPluginsWidget(
self._apply_and_reload_plugins
)

self.setWindowTitle(_("Plugin Configuration"))
self.setMinimumWidth(DIALOG_MIN_WIDTH)
Expand All @@ -627,6 +631,7 @@ def __init__(self, parent: DLMainWindow):
self.tabs = QW.QTabWidget()
self.tabs.addTab(self._create_plugins_tab(), _("Enable/disable plugins"))
self.tabs.addTab(self._create_search_paths_tab(), _("Plugin settings"))
self.tabs.addTab(self.installed_plugins_widget, _("Install plugins"))
self.tabs.setCornerWidget(self._create_corner_widget(), QC.Qt.TopRightCorner)
layout.addWidget(self.tabs, 1)

Expand Down Expand Up @@ -997,6 +1002,7 @@ def _update_global_plugins_ui(self) -> None:
self.settings_scroll.setEnabled(enabled)
if self.settings_disabled_label is not None:
self.settings_disabled_label.setVisible(not enabled)
self.installed_plugins_widget.setEnabled(enabled)
for widget in self.fixed_path_widgets + self.extra_path_widgets:
widget.set_links_enabled(enabled)

Expand Down
Loading
Loading