scipion.install.plugin_funcs module
- class scipion.install.plugin_funcs.PluginInfo(pipName='', name='', pluginSourceUrl='', remote=True, plugin=None, **kwargs)[source]
Bases:
object
- getCompatiblePipReleases(pipJsonData=None)[source]
Get pip releases of this plugin that are compatible with current Scipion version. Returns dict with all compatible releases and a special key “latest” with the most recent one.
- getDirName()[source]
Get the name of the folder that contains the plugin code itself (e.g. to import the _plugin object.)
- getInstallenv(envArgs=None)[source]
Reads the defineBinaries function from Plugin class and returns an Environment object with the plugin’s binaries.
- getPipData(info, keys)[source]
Extracts a value from a dictionary (info) based on the primary key. Supports nested keys using dot notation (e.g., “project_urls.Homepage”).
- Parameters
info – Dictionary containing data (e.g., pip info).
keys – List of keys to extract the value (dot notation for nested keys).
- Returns
The extracted value or ‘’ if no keys match.
- installBin(args=None)[source]
Install binaries of the plugin. Args is the list of args to be passed to the install environment.
- installPipModule(version='')[source]
Installs the version specified of the pip plugin, as long as it is compatible with the current Scipion version. If no version specified, will install latest compatible one.
- isInstalled()[source]
Checks if the current plugin is installed (i.e. has pip package). NOTE: we might want to change definition of isInstalled, hence the extra function.
- printBinInfoStr()[source]
Returns string with info of binaries installed to print in console with flag –help
- setFakedRemotePluginInfo()[source]
Sets value for the attributes that need to be obtained from json file
- setLocalPluginInfo()[source]
Sets value for the attributes that can be obtained locally if the plugin is installed.
- class scipion.install.plugin_funcs.PluginRepository(repoUrl='plugins.json')[source]
Bases:
object
- getPlugins(pluginList=None, getPipData=False)[source]
Reads available plugins from self.repoUrl and returns a dict with PluginInfo objects. Params: - pluginList: A list with specific plugin pip-names we want to get. - getPipData: If true, each PluginInfo object will try to get the data of the plugin from pypi.
- printPluginInfoStr(withBins=False, withUpdates=False)[source]
Returns string to print in console which plugins are installed.
- Parameters
withBins – If true, will add binary info for the plugins installed
withUpdates – If true, will check if the installed plugins have new releases.
:return A string with the plugin information summarized