Module pluginconf.depends

Dependency validation and consistency checker for updates

Classes

class DependencyValidation (add={}, core=['st2', 'uikit', 'config', 'action'])

Now this definitely requires customization. Each plugin can carry a list of (soft-) dependency names.

# depends: config, appcore >= 2.0, bin:wkhtmltoimage, python < 3.5

Here only in-application modules are honored, system references ignored. Unknown plugin names are also skipped. A real install helper might want to auto-tick them on, etc. This example is just meant for probing downloadable plugins.

The .valid() helper only asserts the api: string, or skips existing modules, and if they're more recent. While .depends() compares minimum versions against existing modules.

In practice there's little need for full-blown dependency resolving for application-level modules.

Attributes

api : list
allowed api: identifiers for .valid() stream checks
log : logging
warning handler
have : dict
accumulated list of existing/virtual plugins

Parameters

add : dict
name to pmd list of existing/core/virtual plugins (can define versions or own dependencies)
core : list
name list of virtual plugins

Class variables

var api

debugging

var log

Methods

def and_or(self, deps, have, r=True)
def cmp(self, d, have, absent=True)
def depends(self, plugin)

test depends: and breaks:

def module_test(self, type, name)
def neither(self, deps, have)
def split(self, dep_str)
def valid(self, new_plugin)

check plugin info from repository stream (fields there $name, $file, $dist, api, id, depends, etc)