Plugin Support¶
Runtime Plugins¶
Runtime plugins are supported using the pluggy library.
Runtime plugins can be created as Python packages that contain the respective entry point definition in their setup.py file, like so:
from setuptools import setup
setup(
...
entry_points={"renku": ["name_of_plugin = myproject.pluginmodule"]},
...
)
where myproject.pluginmodule points to a Renku hookimpl e.g.:
from renku.core.plugins import hookimpl
@hookimpl
def plugin_hook_implementation(param1, param2):
...
renku run hooks¶
Plugin hooks for renku run customization.
-
renku.core.plugins.run.cmdline_tool_annotations(tool)[source]¶ Plugin Hook to add
Annotationentry list to aWorkflowTool.- Parameters
run – A
WorkflowToolobject to get annotations for.- Returns
A list of
renku.core.models.cwl.annotation.Annotationobjects.
CLI Plugins¶
Command-line interface plugins are supported using the click-plugins <https://github.com/click-contrib/click-plugins> library.
As in case the runtime plugins, command-line plugins can be created as Python packages that contain the respective entry point definition in their setup.py file, like so:
from setuptools import setup
setup(
...
entry_points={"renku.cli_plugins": ["mycmd = myproject.pluginmodule:mycmd"]},
...
)
where myproject.pluginmodule:mycmd points to a click command e.g.:
import click
@click.command()
def mycmd():
...