aiida.plugins package¶
Classes and functions to load and interact with plugin classes accessible through defined entry points.
-
aiida.plugins.
load_entry_point
(group, name)[source]¶ Load the class registered under the entry point for a given name and group
- Parameters
group – the entry point group
name – the name of the entry point
- Returns
class registered at the given entry point
- Raises
TypeError – if the entry_point_string is not a string type
ValueError – if the entry_point_string cannot be split into two parts on the entry point string separator
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
-
aiida.plugins.
load_entry_point_from_string
(entry_point_string)[source]¶ Load the class registered for a given entry point string that determines group and name
- Parameters
entry_point_string – the entry point string
- Returns
class registered at the given entry point
- Raises
TypeError – if the entry_point_string is not a string type
ValueError – if the entry_point_string cannot be split into two parts on the entry point string separator
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
-
aiida.plugins.
BaseFactory
(group, name)[source]¶ Return the plugin class registered under a given entry point group and name.
- Parameters
group – entry point group
name – entry point name
- Returns
the plugin class
- Raises
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
-
aiida.plugins.
CalculationFactory
(entry_point_name)[source]¶ Return the CalcJob sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
CalcJob
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
DataFactory
(entry_point_name)[source]¶ Return the Data sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Data
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
DbImporterFactory
(entry_point_name)[source]¶ Return the DbImporter sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
DbImporter
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
OrbitalFactory
(entry_point_name)[source]¶ Return the Orbital sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Orbital
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
ParserFactory
(entry_point_name)[source]¶ Return the Parser sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Parser
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
SchedulerFactory
(entry_point_name)[source]¶ Return the Scheduler sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Scheduler
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
TransportFactory
(entry_point_name)[source]¶ Return the Transport sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Transport
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.
WorkflowFactory
(entry_point_name)[source]¶ Return the WorkChain sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
WorkChain
or a workfunction- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
Submodules¶
-
aiida.plugins.entry_point.
load_entry_point
(group, name)[source]¶ Load the class registered under the entry point for a given name and group
- Parameters
group – the entry point group
name – the name of the entry point
- Returns
class registered at the given entry point
- Raises
TypeError – if the entry_point_string is not a string type
ValueError – if the entry_point_string cannot be split into two parts on the entry point string separator
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
-
aiida.plugins.entry_point.
load_entry_point_from_string
(entry_point_string)[source]¶ Load the class registered for a given entry point string that determines group and name
- Parameters
entry_point_string – the entry point string
- Returns
class registered at the given entry point
- Raises
TypeError – if the entry_point_string is not a string type
ValueError – if the entry_point_string cannot be split into two parts on the entry point string separator
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
Definition of factories to load classes from the various plugin groups.
-
aiida.plugins.factories.
BaseFactory
(group, name)[source]¶ Return the plugin class registered under a given entry point group and name.
- Parameters
group – entry point group
name – entry point name
- Returns
the plugin class
- Raises
aiida.common.MissingEntryPointError – entry point was not registered
aiida.common.MultipleEntryPointError – entry point could not be uniquely resolved
aiida.common.LoadingEntryPointError – entry point could not be loaded
-
aiida.plugins.factories.
CalculationFactory
(entry_point_name)[source]¶ Return the CalcJob sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
CalcJob
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
DataFactory
(entry_point_name)[source]¶ Return the Data sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Data
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
DbImporterFactory
(entry_point_name)[source]¶ Return the DbImporter sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
DbImporter
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
OrbitalFactory
(entry_point_name)[source]¶ Return the Orbital sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Orbital
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
ParserFactory
(entry_point_name)[source]¶ Return the Parser sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Parser
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
SchedulerFactory
(entry_point_name)[source]¶ Return the Scheduler sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Scheduler
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
TransportFactory
(entry_point_name)[source]¶ Return the Transport sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
Transport
- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
-
aiida.plugins.factories.
WorkflowFactory
(entry_point_name)[source]¶ Return the WorkChain sub class registered under the given entry point.
- Parameters
entry_point_name – the entry point name
- Returns
sub class of
WorkChain
or a workfunction- Raises
aiida.common.InvalidEntryPointTypeError – if the type of the loaded entry point is invalid.
Utilities dealing with plugins and entry points.
-
class
aiida.plugins.utils.
PluginVersionProvider
[source]¶ Bases:
object
Utility class that determines version information about a given plugin resource.
-
__dict__
= mappingproxy({'__module__': 'aiida.plugins.utils', '__doc__': 'Utility class that determines version information about a given plugin resource.', '__init__': <function PluginVersionProvider.__init__>, 'logger': <property object>, 'get_version_info': <function PluginVersionProvider.get_version_info>, '__dict__': <attribute '__dict__' of 'PluginVersionProvider' objects>, '__weakref__': <attribute '__weakref__' of 'PluginVersionProvider' objects>})¶
-
__module__
= 'aiida.plugins.utils'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
get_version_info
(plugin)[source]¶ Get the version information for a given plugin.
Note
This container will keep a cache, so if this function was already called for the given
plugin
before for this instance, the result computer at last invocation will be returned.- Parameters
plugin – a class or function
- Returns
dictionary with the version.core and optionally version.plugin if it could be determined.
-
property
logger
¶
-