Indicate version for `VTKPythonAlgorithmBase`-based Python plugin

I’ve been developing plugins for ParaView using the new VTKPythonAlgorithmBase interface. Is it possible to indicate the version in the Python file? Currently the version is always (unknown)

@ben.boeckel @utkarsh.ayachit

AFAIK, no there isn’t. Some wires need to be linked up in the plugin loading logic (which needs an issue I think). XML plugins probably also deserve a version field.

Thanks for your reply!

I’ve filed an issue here to track it:

1 Like

I found this piece of code inside

def get_plugin_version(module_or_package):
    """helper function called by vtkPVPythonAlgorithmPlugin to discover
    ParaView plugin version, if any."""
    from inspect import ismodule, isclass
    if ismodule(module_or_package) and hasattr(module_or_package, "paraview_plugin_version"):
        return str(getattr(module_or_package, "paraview_plugin_version"))
        return "(unknown)"

See also So we just need to define a paraview_plugin_version variable inside the Python file!


Works perfectly now!