Exemplo n.º 1
0
def _op_plugins(opdef):
    project_plugins = _project_plugins(opdef)
    op_plugins = []
    for name, plugin in pluginlib.iter_plugins():
        if not _plugin_selected(plugin, project_plugins):
            log.debug("plugin '%s' not configured for operation", name)
            continue
        enabled, reason = plugin.enabled_for_op(opdef)
        if not enabled:
            log.debug(
                "plugin '%s' configured for operation but cannot be enabled%s",
                name, " (%s)" % reason if reason else "")
            continue
        log.debug("plugin '%s' enabled for operation%s", name,
                  " (%s)" % reason if reason else "")
        op_plugins.append(name)
    return ",".join(sorted(op_plugins))
Exemplo n.º 2
0
def _plugins_by_resolve_model_op_priority():
    return sorted(
        pluginlib.iter_plugins(), key=lambda x: x[1].resolve_model_op_priority
    )
Exemplo n.º 3
0
def _notify_plugins_guildfile_loaded(gf):
    for _name, plugin in pluginlib.iter_plugins():
        plugin.guildfile_loaded(gf)
Exemplo n.º 4
0
def _notify_plugins_guildfile_data(data, src):
    for _name, plugin in pluginlib.iter_plugins():
        plugin.guildfile_data(data, src)
Exemplo n.º 5
0
def _notify_plugins_guildfile_loaded(gf):
    from guild import plugin as pluginlib  # expensive
    for _name, plugin in pluginlib.iter_plugins():
        plugin.guildfile_loaded(gf)
Exemplo n.º 6
0
def _notify_plugins_guildfile_data(data, src):
    from guild import plugin as pluginlib  # expensive
    for _name, plugin in pluginlib.iter_plugins():
        plugin.guildfile_data(data, src)
Exemplo n.º 7
0
 def _notify_plugins_opdef_loaded(opdef):
     for _name, plugin in pluginlib.iter_plugins():
         if isinstance(plugin, PythonScriptOpdefSupport):
             plugin.python_script_opdef_loaded(opdef)
Exemplo n.º 8
0
def _format_plugins():
    return ", ".join([name for name, _ in sorted(plugin.iter_plugins())])
Exemplo n.º 9
0
def _format_plugins():
    names = set([name for name, _ in plugin.iter_plugins()])
    return ", ".join(sorted(names))