Skip to content

Commit 91a07a7

Browse files
Merge pull request #39 from eccenca/feature/pluginDeprecation-CMEM-6706
Add deprecation support to plugins
2 parents cdcc3f3 + 5b6b17b commit 91a07a7

4 files changed

Lines changed: 632 additions & 571 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/)
77

8+
## Unreleased
9+
10+
### Added
11+
12+
- Plugins can be deprecated now (CMEM-6706)
13+
814
## [4.16.1] 2026-02-20
915

1016
### Fixed

cmem_plugin_base/dataintegration/description.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ class PluginDescription:
186186
:param parameters: Available plugin parameters
187187
:param icon: An optional custom plugin icon.
188188
:param actions: Custom plugin actions.
189+
:param deprecation: Optional deprecation message.
190+
If set, the plugin will be marked as deprecated in the UI.
189191
"""
190192

191193
def __init__( # noqa: PLR0913
@@ -199,6 +201,7 @@ def __init__( # noqa: PLR0913
199201
parameters: list[PluginParameter] | None = None,
200202
icon: Icon | None = None,
201203
actions: list[PluginAction] | None = None,
204+
deprecation: str | None = None,
202205
) -> None:
203206
# Set the type of the plugin. Same as the class name of the plugin
204207
# base class, e.g., 'WorkflowPlugin'.
@@ -238,6 +241,7 @@ def __init__( # noqa: PLR0913
238241
self.actions = []
239242
else:
240243
self.actions = actions
244+
self.deprecation = deprecation
241245
for action in self.actions:
242246
action.validate(plugin_class)
243247

@@ -321,6 +325,8 @@ class Plugin:
321325
:param parameters: Available plugin parameters.
322326
:param icon: Optional custom plugin icon.
323327
:param actions: Custom plugin actions
328+
:param deprecation: Optional deprecation message.
329+
If set, the plugin will be marked as deprecated in the UI.
324330
"""
325331

326332
plugins: ClassVar[list[PluginDescription]] = []
@@ -335,13 +341,15 @@ def __init__( # noqa: PLR0913
335341
parameters: list[PluginParameter] | None = None,
336342
icon: Icon | None = None,
337343
actions: list[PluginAction] | None = None,
344+
deprecation: str | None = None,
338345
):
339346
self.label = label
340347
self.description = description
341348
self.documentation = documentation
342349
self.plugin_id = plugin_id
343350
self.icon = icon
344351
self.actions = actions
352+
self.deprecation = deprecation
345353
if categories is None:
346354
self.categories = []
347355
else:
@@ -363,6 +371,7 @@ def __call__(self, func: type):
363371
parameters=self.retrieve_parameters(func),
364372
icon=self.icon,
365373
actions=self.actions,
374+
deprecation=self.deprecation,
366375
)
367376
Plugin.plugins.append(plugin_desc)
368377
return func

0 commit comments

Comments
 (0)