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))
def _plugins_by_resolve_model_op_priority(): return sorted( pluginlib.iter_plugins(), key=lambda x: x[1].resolve_model_op_priority )
def _notify_plugins_guildfile_loaded(gf): for _name, plugin in pluginlib.iter_plugins(): plugin.guildfile_loaded(gf)
def _notify_plugins_guildfile_data(data, src): for _name, plugin in pluginlib.iter_plugins(): plugin.guildfile_data(data, src)
def _notify_plugins_guildfile_loaded(gf): from guild import plugin as pluginlib # expensive for _name, plugin in pluginlib.iter_plugins(): plugin.guildfile_loaded(gf)
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)
def _notify_plugins_opdef_loaded(opdef): for _name, plugin in pluginlib.iter_plugins(): if isinstance(plugin, PythonScriptOpdefSupport): plugin.python_script_opdef_loaded(opdef)
def _format_plugins(): return ", ".join([name for name, _ in sorted(plugin.iter_plugins())])
def _format_plugins(): names = set([name for name, _ in plugin.iter_plugins()]) return ", ".join(sorted(names))