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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.

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

## Unreleased

### Added

- Plugins can be deprecated now (CMEM-6706)

## [4.16.1] 2026-02-20

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions cmem_plugin_base/dataintegration/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ class PluginDescription:
:param parameters: Available plugin parameters
:param icon: An optional custom plugin icon.
:param actions: Custom plugin actions.
:param deprecation: Optional deprecation message.
If set, the plugin will be marked as deprecated in the UI.
"""

def __init__( # noqa: PLR0913
Expand All @@ -199,6 +201,7 @@ def __init__( # noqa: PLR0913
parameters: list[PluginParameter] | None = None,
icon: Icon | None = None,
actions: list[PluginAction] | None = None,
deprecation: str | None = None,
) -> None:
# Set the type of the plugin. Same as the class name of the plugin
# base class, e.g., 'WorkflowPlugin'.
Expand Down Expand Up @@ -238,6 +241,7 @@ def __init__( # noqa: PLR0913
self.actions = []
else:
self.actions = actions
self.deprecation = deprecation
for action in self.actions:
action.validate(plugin_class)

Expand Down Expand Up @@ -321,6 +325,8 @@ class Plugin:
:param parameters: Available plugin parameters.
:param icon: Optional custom plugin icon.
:param actions: Custom plugin actions
:param deprecation: Optional deprecation message.
If set, the plugin will be marked as deprecated in the UI.
"""

plugins: ClassVar[list[PluginDescription]] = []
Expand All @@ -335,13 +341,15 @@ def __init__( # noqa: PLR0913
parameters: list[PluginParameter] | None = None,
icon: Icon | None = None,
actions: list[PluginAction] | None = None,
deprecation: str | None = None,
):
self.label = label
self.description = description
self.documentation = documentation
self.plugin_id = plugin_id
self.icon = icon
self.actions = actions
self.deprecation = deprecation
if categories is None:
self.categories = []
else:
Expand All @@ -363,6 +371,7 @@ def __call__(self, func: type):
parameters=self.retrieve_parameters(func),
icon=self.icon,
actions=self.actions,
deprecation=self.deprecation,
)
Plugin.plugins.append(plugin_desc)
return func
Expand Down
Loading
Loading