exopy.tasks.plugin module¶
Plugin centralizing the collection and managment of tasks and interfaces.
-
class
exopy.tasks.plugin.
TaskManagerPlugin
[source]¶ Bases:
exopy.utils.plugin_tools.HasPreferencesPlugin
Plugin responsible for collecting and providing tasks.
-
templates
¶ Known templates (store full path to .ini). This should not be manipulated by user code.
-
filters
¶ List of the filters.
-
auto_task_path
¶ Path to the file in which the names for the tasks are located.
-
auto_task_names
¶ List of names to use when creating a new task.
-
get_task
(task, view=False)[source]¶ Access a given task class.
- Parameters
task (unicode) – Id of the task class for which to return the actual class.
view (bool, optional) – Whether or not to return the view assoicated with the task.
- Returns
task_cls (type or None) – Class associated to the requested task or None if the task was not found.
task_view (EnamlDefMeta or None, optional) – Associated view if requested.
-
get_tasks
(tasks)[source]¶ Access an ensemble of task classes.
- Parameters
tasks (list(unicode)) – Ids of the task classes for which to return the actual classes.
- Returns
tasks_cls (dict) – Dictionary mapping the requested tasks to the actual classes.
missing (list) – List of classes that were not found.
-
get_interface_infos
(interface)[source]¶ Access a given interface infos.
- Parameters
interface (unicode) – Id of the task this interface is linked to followed by the ids of the intermediate interfaces if any and finally id of the interface itself. All ids should be separated by ‘:’ ex ‘exopy.LoopTask:exopy.IterableLoopInterface’
views (bool, optional) – Whether or not to return the views assoicated with the interface.
- Returns
infos – Object containing all the infos about the requested interface. this object should never be manipulated directly by user code.
- Return type
-
get_interface
(interface, views=False)[source]¶ Access a given interface class.
- Parameters
interface (tuple[unicode|tuple|list]) –
Name of the task class for which to return the actual class.
Name of the task to which this interface is linked and names of the intermediate interfaces if any (going from the most general ones to the more specialised ones).
views (bool, optional) – Whether or not to return the views assoicated with the interface.
- Returns
interface_cls (type or None) – Class corresponding to the requested interface or None if the class was not found.
views (list or None, optional) – List of views associated with the interface.
-
get_interfaces
(interfaces)[source]¶ Access an ensemble of interface classes.
- Parameters
interfaces (list[tuple[unicode|tuple|list]]) – List of pairs (name of the interface class, corrisponding anchor) for which to return the actual classes.
- Returns
interfaces_cls (dict) – Dictionary mapping the requested interfaces to the actual classes.
missing (list) – List of classes that were not found.
-